Commit 5561ecc6 authored by Aurel's avatar Aurel

check permission instead of allowed content type to authorize a person to add events

parent 7b1d01d5
...@@ -60,7 +60,7 @@ portal = context.getPortalObject()\n ...@@ -60,7 +60,7 @@ portal = context.getPortalObject()\n
translateString = portal.Base_translateString\n translateString = portal.Base_translateString\n
module = portal.getDefaultModule(portal_type)\n module = portal.getDefaultModule(portal_type)\n
\n \n
if portal_type not in module.getVisibleAllowedContentTypeList():\n if not portal.Base_checkPermission(module.getId(), "Add portal content"):\n
return context.Base_redirect(form_id,\n return context.Base_redirect(form_id,\n
keep_items=dict(\n keep_items=dict(\n
portal_status_message=translateString("You do not have permission to add new event.")))\n portal_status_message=translateString("You do not have permission to add new event.")))\n
......
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