Download & Extend

Add "Administer Taxonomy Access Control" option in Access Control ("permissions")

Project:Taxonomy Access Control
Version:7.x-1.x-dev
Component:User interface
Category:feature request
Priority:minor
Assigned:Unassigned
Status:needs work

Issue Summary

I'm using 4.7 and there is no option to grant another user "administer taxonomy access control" permission so that they can administer category permissions. If I grant them the "administer access control" permission then they a) don't have access to the "category permissions" tab, and b) can grant themselves all permissions on all modules, so I might as well just give them the admin password. I'm wondering if an option can be added to the "permissions" page to grant a category administrator the necessary permission to "administer taxonomy access control," without granting them the "administer access control" permission.

Comments

#1

You can do this by adding this code to your taxonomy_access.module file:

function taxonomy_access_perm() {
return array("administer taxonomy access-rights");
}

Where you can customize the string "manage taxonomy access-rights" offcourse.

Furthermore you need to make a change in the function taxonomy_access_menu($may_cache) .
Change (line 86 at my version):
$access = user_access('administer users');
To:
$access = user_access('administer taxonomy access-rights'); (or whatever you did name it).
And now it is listed at the "access control" page under "taxonomy_access".

#2

Thanks very much for the code, but I'd still like to see this as a feature in the module so that others can use it as well, without having to copy and paste this customization every time they upgrade.

#3

Off course, its a small thing to add and will add some more value to this great module, hope the developers agree on this.

#4

I aggree, but this would be a more flexible solution:
As a default 'administer access control' would remain, but new permission administrator roles can be set: http://drupal.org/node/92871

What do you guys think?

#5

At the moment, I only have one admin to handle permissions control for everything, but I can certainly see the value in being able to separate the permissions admin. roles by vocabulary or vocab type.

#6

I tried JWV's code, and it worked great. The only thing I added was the following:

$items[] = array(
'path' => 'admin/taxonomy_access', 'title' => t('category permissions'),
'callback' => 'taxonomy_access_admin_form',
'access' => $access,
'callback arguments'=>array(),
'type' => MENU_NORMAL_ITEM
);

That makes a stand-alone menu item appear in the user's menu called "category permissions," that takes them right to the page, and doesn't require them to have the "administer access control" or "access administration pages" permissions.

#7

Oops, forgot to mention that was link 102 in my taxonomy.module file.

#8

Make that taxonomy_access.module. Coffee time.

#9

I have category modules (category-5.x-1.x-dev.tar) and using weblinks. I have created categories under respective containers. Now when i post a new weblink I can select one or more category from the list. Now the problem is my authenticated users can’t see this category list when they are posting a weblinks. Now what should I do so that the users can select a category when posting a weblinks.

Quick reply is appreciated.

Thanks in advance.

#10

Version:4.7.x-1.x-dev» master
Priority:normal» minor

If there are more request to have this feature, it might be solved in later versions.

#11

Status:active» postponed

#12

It would be nice to have this feature.

#13

Version:master» 5.x-2.x-dev

+1 for this feature, greetings, Martijn

#14

Version:5.x-2.x-dev» 6.x-1.x-dev

Moving feature request to the 6.x branch.

#15

Version:6.x-1.x-dev» 7.x-1.x-dev
Status:postponed» needs work

Here's a patch to add this feature to the D7 branch. Note that it will also need a hook_update_N() to migrate users to the new permission, and possibly a bit on module enable to automatically grant the permission to roles with the administer permissions permission.

AttachmentSizeStatusTest resultOperations
tac_permission.patch2.05 KBIdleFAILED: [[SimpleTest]]: [MySQL] 1,993 pass(es), 300 fail(s), and 1 exception(es).View details | Re-test
nobody click here