Commit 9ba13012 authored by Nicolas Dumazet's avatar Nicolas Dumazet

this copy-pasted code never used write_permission


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43252 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9e849100
......@@ -1350,14 +1350,8 @@ def createRelatedAccessors(portal_categories, property_holder, econtext,
Permissions.AccessContentsInformation)
if isinstance(read_permission, Expression):
read_permission = read_permission(econtext)
write_permission = Permissions.__dict__.get(
cat_object.getWritePermission(),
Permissions.ModifyPortalContent)
if isinstance(write_permission, Expression):
write_permission = write_permission(econtext)
else:
read_permission = Permissions.AccessContentsInformation
write_permission = Permissions.ModifyPortalContent
# Actually create accessors
createRelatedValueAccessors(property_holder, cat, read_permission=read_permission)
# Unnecessary to create these accessors more than once.
......
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