selectors.py
branchstable
changeset 7452 7e8182a63559
parent 7448 195b24fe3a03
child 7529 2fdc310be7cd
equal deleted inserted replaced
7451:48ba5f0c11de 7452:7e8182a63559
  1340     * else check all entities in `col` (default to 0) are owned by the user
  1340     * else check all entities in `col` (default to 0) are owned by the user
  1341     """
  1341     """
  1342 
  1342 
  1343     @lltrace
  1343     @lltrace
  1344     def __call__(self, cls, req, rset=None, row=None, col=0, **kwargs):
  1344     def __call__(self, cls, req, rset=None, row=None, col=0, **kwargs):
  1345         if getattr(req, 'cnx', True): # default to True for repo session instances
  1345         if not getattr(req, 'cnx', True): # default to True for repo session instances
  1346             return 0
  1346             return 0
  1347         user = req.user
  1347         user = req.user
  1348         if user is None:
  1348         if user is None:
  1349             return int('guests' in self.expected)
  1349             return int('guests' in self.expected)
  1350         score = user.matching_groups(self.expected)
  1350         score = user.matching_groups(self.expected)