equal
deleted
inserted
replaced
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) |