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.

CommentFileSizeAuthor
#3 adminrole.module.patch550 bytessndev
adminrole.patch482 bytessndev

Comments

jhodgdon’s picture

Just 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?

sndev’s picture

Yes, 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.

sndev’s picture

StatusFileSize
new550 bytes

I 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.

dave reid’s picture

Version: 6.x-1.1 » 6.x-1.x-dev
Status: Needs review » Needs work

I 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.

dave reid’s picture

Status: Needs work » Fixed

Please re-open if this did not solve all the content type permissions, or open a new issue for a new bug.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

jack.r.abbit’s picture

Version: 6.x-1.x-dev » 6.x-1.3
Status: Closed (fixed) » Active

The 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()

nancydru’s picture

Issue summary: View changes
Status: Active » Closed (outdated)