-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"site administrator" role has no permissions #5
Comments
It should be fine to change that to a more specific permission that is assigned to the Manager and Site Administrator roles. Can you make a pull request? |
Although, what about older Plone versions where there is no Site Administrator role? Not sure how to handle that. |
If you set the roles using CMFCore.utils.setDefaultRoles instead of in rolemap.xml it should be okay -- setDefaultRoles doesn't validate the roles that are specified in any way. |
You mean in a "setupVarious"-type importStep? The product doesn't have one (except for the importAnalyticsReportStep), so I'd have to add it. I'm not familiar with CMFCore.utils.setDefaultRoles. Are you saying that if I installed it on Plone 4.0, the call setDefaultRoles( "Google Analytics: Manage Analytics Reports", ( 'Manager', 'Site Administrator' ) ) would be equivalent to setDefaultRoles( "Google Analytics: Manage Analytics Reports", ( 'Manager', ) ) ? I guess I should try it. |
No dice. I tried adding this to exportimport.py, as well as the corresponding zcml:
I'm not sure how this is supposed to work. In CMFCore.permissions.setDefaultRoles, the first thing it does is to check
And since the permission is declared in the main configure.zcml, it just returns and doesn't do anything. |
You have to put setDefaultRoles in init.py outside of any function, so that it runs early during Zope startup. |
Now that there is the useful "site administrator" role, it would be great if it had access to the control panel. Unfortunately, the permission "cmf.ManagePortal" is used in several places, so it can't even be overridden in the ZMI.
The text was updated successfully, but these errors were encountered: