schema.py
changeset 4045 f4a52abb6f4f
parent 4037 42f3a80738d7
child 4066 0555f170c4d1
equal deleted inserted replaced
4044:3876c894e018 4045:f4a52abb6f4f
   435         if objtype and subjtype:
   435         if objtype and subjtype:
   436             return self.rdef(subjtype, objtype).has_perm(session, action, **kwargs)
   436             return self.rdef(subjtype, objtype).has_perm(session, action, **kwargs)
   437         elif subjtype:
   437         elif subjtype:
   438             for tschema in self.targets(subjtype, 'subject'):
   438             for tschema in self.targets(subjtype, 'subject'):
   439                 rdef = self.rdef(subjtype, tschema)
   439                 rdef = self.rdef(subjtype, tschema)
   440                 if not rdef.has_perm(action, req, **kwargs):
   440                 if not rdef.has_perm(session, action, **kwargs):
   441                     return False
   441                     return False
   442         elif objtype:
   442         elif objtype:
   443             for tschema in self.targets(objtype, 'object'):
   443             for tschema in self.targets(objtype, 'object'):
   444                 rdef = self.rdef(tschema, objtype)
   444                 rdef = self.rdef(tschema, objtype)
   445                 if not rdef.has_perm(session, action, **kwargs):
   445                 if not rdef.has_perm(session, action, **kwargs):