selectors.py
branchstable
changeset 6364 ad9ed9803eb6
parent 6360 1edfc0f3bb1d
child 6366 1806148d6ce8
child 6541 9c3821885443
equal deleted inserted replaced
6363:b9ec8ebc187a 6364:ad9ed9803eb6
  1071             if need_local_check:
  1071             if need_local_check:
  1072                 # check local role for entities of necessary types
  1072                 # check local role for entities of necessary types
  1073                 for i, row in enumerate(rset):
  1073                 for i, row in enumerate(rset):
  1074                     if not rset.description[i][col] in need_local_check:
  1074                     if not rset.description[i][col] in need_local_check:
  1075                         continue
  1075                         continue
  1076                     if not self.score(req, rset, i, col):
  1076                     # micro-optimisation instead of calling self.score(req,
       
  1077                     # rset, i, col): rset may be large
       
  1078                     if not rset.get_entity(i, col).cw_has_perm(action):
  1077                         return 0
  1079                         return 0
  1078                 score += 1
  1080                 score += 1
  1079             return score
  1081             return score
  1080         return self.score(req, rset, row, col)
  1082         return self.score(req, rset, row, col)
  1081 
  1083