hooks/security.py
changeset 2895 903bd3f89f80
parent 2847 c2ee28f4d4b1
child 2968 0e3460341023
equal deleted inserted replaced
2894:4b720d82a1e4 2895:903bd3f89f80
    80 class BeforeDelEntitySecurityHook(SecurityHook):
    80 class BeforeDelEntitySecurityHook(SecurityHook):
    81     __id__ = 'securitybeforedelentity'
    81     __id__ = 'securitybeforedelentity'
    82     events = ('before_delete_entity',)
    82     events = ('before_delete_entity',)
    83 
    83 
    84     def __call__(self):
    84     def __call__(self):
    85         self.entity.e_schema.check_perm(self._cw, 'delete', eid)
    85         self.entity.check_perm('delete')
    86 
    86 
    87 
    87 
    88 class BeforeAddRelationSecurityHook(SecurityHook):
    88 class BeforeAddRelationSecurityHook(SecurityHook):
    89     __id__ = 'securitybeforeaddrelation'
    89     __id__ = 'securitybeforeaddrelation'
    90     events = ('before_add_relation',)
    90     events = ('before_add_relation',)