Specify creation roles for AGX generated content

An observation: when you want to specify the roles that are required for a user to have in order to create a piece of content, you'll have to also specify a creation permission.

This means that the following tagged values are required, to something like:

creation_permission = Create MyContent
creation_roles = python: ('Anonymous', 'Member')

This generates the following code in config.py:

DEFAULT_ADD_CONTENT_PERMISSION = "Add portal content"
setDefaultRoles(DEFAULT_ADD_CONTENT_PERMISSION, ('Manager', 'Owner'))
ADD_CONTENT_PERMISSIONS = {
    'MyContent': 'Create MyContent',
}

setDefaultRoles('Create MyContent',  ('Anonymous', 'Member'))


Comments