[security] Add comment to check_entity_attributes shortcut
Make it clear that it is only an optimization.
Related to #3444095.
--- 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)