The user who has been granted "Update" permissions to a given node does not automatically have the ability to change the content access privileges associated with that node (see image).

It would be great to have 'administer', in addition to the existing 'view', 'update', and 'delete' permissions. Any thoughts about how to add this would be appreciated!

CommentFileSizeAuthor
permission-granted.png25.16 KBholtzermann17

Comments

holtzermann17’s picture

Rather than adding another permission, the simplest idea I can think of is to let anyone with 'delete' permission also have access to the tab that controls the ACL.

It seems like I just have to change this function, like so:

function content_access_node_page_access($node) {
  global $user;
  return content_access_get_settings('per_node', $node->type) && user_access('grant content access') ||
    content_access_get_settings('per_node', $node->type) && (user_access('grant own content access') && ($user->uid == $node->uid)) 
         || db_query("SELECT acl_node.grant_delete FROM acl_node,acl_user WHERE acl_node.nid = :nid AND acl_user.acl_id = acl_node.acl_id AND acl_user.uid = :uid", array(':nid' => $node->nid, ':uid' => $user->uid))->fetchField();
 ;
}

Maybe there's a nicer way to do it?

holtzermann17’s picture

Category: support » feature

I guess I'll turn this into a feature request; given that there's now a prototype solution, maybe something less hacky will come to mind for one of ya'll.

David4514’s picture

I'm also interested in being able to control "Content Access" permission by content type and role.

[Edit] On re-reading the initial issue, I don't think that what I want quite matches this issue.

gisle’s picture

Version: 7.x-1.2-beta1 » 7.x-1.x-dev
Issue summary: View changes
Status: Active » Closed (outdated)

Th image show a body field with a Test Format the user is not allowed to use. The access that is implicit from Text Formats has nothing to do with Content Access.

This issue has not received any updates in the previous 8 years. If you believe it to still be relevant, you are encouraged to reopen the issue and update it.

If you got an email about this Issue status update, it is because you at one time (possibly a very long time ago), subscribed to it. To learn how to unsubscribe yourself, please visit: https://www.drupal.org/project/webmasters/issues/3142987