Commit 492eb5d7 authored by Nicolas Dumazet's avatar Nicolas Dumazet

fix tuple definition


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43249 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent dc825218
...@@ -44,8 +44,8 @@ from Products.ERP5Type.Globals import InitializeClass ...@@ -44,8 +44,8 @@ from Products.ERP5Type.Globals import InitializeClass
from zLOG import LOG, ERROR, INFO from zLOG import LOG, ERROR, INFO
class AccessorHolderType(type): class AccessorHolderType(type):
_skip_permission_set = set(Permissions.AccessContentsInformation, _skip_permission_tuple = (Permissions.AccessContentsInformation,
Permissions.ModifyPortalContent) Permissions.ModifyPortalContent)
def registerAccessor(cls, def registerAccessor(cls,
accessor, accessor,
permission): permission):
...@@ -53,7 +53,7 @@ class AccessorHolderType(type): ...@@ -53,7 +53,7 @@ class AccessorHolderType(type):
setattr(cls, accessor_name, accessor) setattr(cls, accessor_name, accessor)
# private accessors do not need declarative security # private accessors do not need declarative security
if accessor_name[0] != '_' and \ if accessor_name[0] != '_' and \
permission not in AccessorHolderType._skip_permission_set: permission not in AccessorHolderType._skip_permission_tuple:
cls.security.declareProtected(permission, accessor_name) cls.security.declareProtected(permission, accessor_name)
@classmethod @classmethod
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment