equal
deleted
inserted
replaced
423 return False |
423 return False |
424 |
424 |
425 def has_perm(self, session, action, **kwargs): |
425 def has_perm(self, session, action, **kwargs): |
426 """return true if the action is granted globaly or localy""" |
426 """return true if the action is granted globaly or localy""" |
427 if 'fromeid' in kwargs: |
427 if 'fromeid' in kwargs: |
428 subjtype = session.describe(kwargs['fromeid']) |
428 subjtype = session.describe(kwargs['fromeid'])[0] |
429 else: |
429 else: |
430 subjtype = None |
430 subjtype = None |
431 if 'toeid' in kwargs: |
431 if 'toeid' in kwargs: |
432 objtype = session.describe(kwargs['toeid']) |
432 objtype = session.describe(kwargs['toeid'])[0] |
433 else: |
433 else: |
434 objtype = Nono |
434 objtype = Nono |
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: |