Commit f4a7c452 authored by Mohamadou Mbengue's avatar Mohamadou Mbengue

2010-06-25 mohamadou

*Give anonymous access to a portal_type that does not require authentication

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36602 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0a2aa97b
......@@ -126,7 +126,9 @@ def setPermissionsOnEGovModule(self, portal_type_object):
'WebDAV Lock items','WebDAV Unlock items',
'WebDAV access',
]
view_permission_list= [ Permissions.AccessContentsInformation, Permissions.ListFolderContents \
, Permissions.View ]
role_permission_dict = {'Anonymous':[Permissions.AccessContentsInformation, Permissions.AddPortalContent \
,Permissions.CopyOrMove, Permissions.ModifyPortalContent \
......@@ -162,10 +164,14 @@ def setPermissionsOnEGovModule(self, portal_type_object):
for (role, permission_list) in role_permission_dict.items():
if role == "Anonymous" and not step_authentication and not step_subscription:
self.manage_role(role_to_manage=role, permissions=permission_list)
#give anonymous access to the portal type
portal_type_object.manage_role(role_to_manage=role, permissions=view_permission_list)
elif role != "Anonymous":
self.manage_role(role_to_manage=role, permissions=permission_list)
if role == "Agent":
portal_type_object.manage_role(role_to_manage=role, permissions=permission_list)
#set acquired local role on the portal type
portal_type_object.setTypeAcquireLocalRole(1)
def getSecurityCategoryFromAssignment(self, base_category_list, user_name,
object, portal_type, child_category_list=[]):
......
2010-06-25 mohamadou
*Give anonymous access to a portal_type that does not require authentication
2010-06-24 mohamadou
*rename the script Egov_updateProcedureLocalRole in EGov_updateProcedureLocalRole
......
630
\ No newline at end of file
633
\ No newline at end of file
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