should directly use entity.check_perm now that we've an entity instance
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 18 Aug 2009 00:29:19 +0200
changeset 2895 903bd3f89f80
parent 2894 4b720d82a1e4
child 2896 1e7848c69be4
should directly use entity.check_perm now that we've an entity instance
hooks/security.py
--- a/hooks/security.py	Tue Aug 18 00:28:55 2009 +0200
+++ b/hooks/security.py	Tue Aug 18 00:29:19 2009 +0200
@@ -82,7 +82,7 @@
     events = ('before_delete_entity',)
 
     def __call__(self):
-        self.entity.e_schema.check_perm(self._cw, 'delete', eid)
+        self.entity.check_perm('delete')
 
 
 class BeforeAddRelationSecurityHook(SecurityHook):