[security] Add comment to check_entity_attributes shortcut
authorJulien Cristau <julien.cristau@logilab.fr>
Thu, 16 Jan 2014 13:50:26 +0100
changeset 9412 8aa6c923d6c0
parent 9411 6aec72169ee1
child 9413 3861ebfd6aa8
[security] Add comment to check_entity_attributes shortcut Make it clear that it is only an optimization. Related to #3444095.
hooks/security.py
--- a/hooks/security.py	Thu Jan 16 12:21:05 2014 +0100
+++ b/hooks/security.py	Thu Jan 16 13:50:26 2014 +0100
@@ -60,7 +60,8 @@
                 # nothing.
                 continue
             if perms == ():
-                # That means an immutable attribute.
+                # That means an immutable attribute; as an optimization, avoid
+                # going through check_perm.
                 raise Unauthorized(action, str(rdef))
             rdef.check_perm(session, action, eid=eid)