selectors.py
branchstable
changeset 3345 10ad3869fc92
parent 3276 4480887772a3
child 3346 b1fd9d4ef579
equal deleted inserted replaced
3344:699949007fc2 3345:10ad3869fc92
   667     def __call__(self, cls, req, *args, **kwargs):
   667     def __call__(self, cls, req, *args, **kwargs):
   668         rschema = cls.schema.rschema(self.rtype)
   668         rschema = cls.schema.rschema(self.rtype)
   669         if not (rschema.has_perm(req, self.action)
   669         if not (rschema.has_perm(req, self.action)
   670                 or rschema.has_local_role(self.action)):
   670                 or rschema.has_local_role(self.action)):
   671             return 0
   671             return 0
       
   672         if self.action != 'read':
       
   673             if not (rschema.has_perm(req, 'read')
       
   674                     or rschema.has_local_role('read')):
       
   675                 return 0
   672         score = super(relation_possible, self).__call__(cls, req, *args, **kwargs)
   676         score = super(relation_possible, self).__call__(cls, req, *args, **kwargs)
   673         return score
   677         return score
   674 
   678 
   675     def score_class(self, eclass, req):
   679     def score_class(self, eclass, req):
   676         eschema = eclass.e_schema
   680         eschema = eclass.e_schema