Commit a9975383 authored by Romain Courteaud's avatar Romain Courteaud

Add missing security declaration.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2985 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3356553d
......@@ -2143,32 +2143,40 @@ def createValueAccessors(klass, id):
setter = Value.Setter(setter_name, id, reindex=0)
if not hasattr(klass, setter_name):
setattr(klass, setter_name, setter)
klass.security.declareProtected(Permissions.ModifyPortalContent, setter_name)
setter_name = '_categorySet' + UpperCase(id) + 'Value'
if not hasattr(klass, setter_name):
setattr(klass, setter_name, setter)
klass.security.declareProtected(Permissions.ModifyPortalContent, setter_name)
setter_name = '_set' + UpperCase(id) + 'ValueList'
if not hasattr(klass, setter_name):
setattr(klass, setter_name, setter)
klass.security.declareProtected(Permissions.ModifyPortalContent, setter_name)
setter_name = '_categorySet' + UpperCase(id) + 'ValueList'
if not hasattr(klass, setter_name):
setattr(klass, setter_name, setter)
klass.security.declareProtected(Permissions.ModifyPortalContent, setter_name)
setter_name = '_set' + UpperCase(id) + 'ValueSet'
setter = Value.SetSetter(setter_name, id, reindex=0)
if not hasattr(klass, setter_name):
setattr(klass, setter_name, setter)
klass.security.declareProtected(Permissions.ModifyPortalContent, setter_name)
setter_name = '_categorySet' + UpperCase(id) + 'ValueSet'
if not hasattr(klass, setter_name):
setattr(klass, setter_name, setter)
klass.security.declareProtected(Permissions.ModifyPortalContent, setter_name)
setter_name = '_setDefault' + UpperCase(id) + 'Value'
setter = Value.DefaultSetter(setter_name, id, reindex=0)
if not hasattr(klass, setter_name):
setattr(klass, setter_name, setter)
klass.security.declareProtected(Permissions.ModifyPortalContent, setter_name)
setter_name = '_categorySetDefault' + UpperCase(id) + 'Value'
if not hasattr(klass, setter_name):
setattr(klass, setter_name, setter)
klass.security.declareProtected(Permissions.ModifyPortalContent, setter_name)
# Uid setters
setter_name = 'set' + UpperCase(id) + 'Uid'
......
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