Every time a content type is created, edited or deleted via the content type form there should be an update to the admin role to reflect the permissions. We created a patch to deal with this issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | adminrole.module.patch | 550 bytes | sndev |
| adminrole.patch | 482 bytes | sndev |
Comments
Comment #1
jhodgdonJust a note that if you are using the Content Permissions module of CCK (field-level permissions), you also need to update the permissions for editing/viewing permissions on the individual fields. Does this patch do that?
Comment #2
sndev commentedYes, it does. The way that admin_role works is it activates all permissions for the super_role when the adminrole_update_perms function is run.Comment #3
sndev commentedI thought about your question a little bit more and I don't think it will do permissions for CCK fields automatically. I think two form references need to be put in the adminrole_form_alter content_field_edit_form and content_field_overview_form. I've added a new patch that includes this functionality.
Comment #4
dave reidI don't see the reasoning for including the form ID 'content_field_edit_form'. Committed the addition of node_type_form and content_field_overview_form to CVS.
Comment #5
dave reidPlease re-open if this did not solve all the content type permissions, or open a new issue for a new bug.
Comment #7
jack.r.abbit commentedThe code used in 6.x-1.3 changed from the code in 6.x-1.2 to make use of hook_node_type() but that does not seem to be working. The hook certainly triggers but the permissions are not changed. I think that the hook is called before the permissions have been updated (or even before the node type has actually been added) so there is nothing new to update. I have confirmed that the code in 6.x-1.2 does work when the latest code does not. node_type_form should be added back into the array in adminrole_form_alter()
Comment #8
nancydru