Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I'm making a website with Drupal 7, and I was looking through the permissions for Taxonomies. I wanted to give the website maintainers a central place to manage the vocabularies and add terms, sort the terms etc. So I gave their role the "Administer vocabularies and terms" permission under Taxonomy. This however resulted in an unwanted complication, mainly it gave them access to create new fields and manage their display ("Manage Fields" and "Manage Display" tabs).

Is there a way to give them access to the Vocabulary and Term edit screen which can be accessed through "Structure > Taxonomy" but however disable the "Manage Fields" and "Manage Display" tabs on the vocabulary edit screen?

I'm quite familiar with the notion of overriding and hooks in Drupal 6, but I'm quite new to Drupal 7 (in fact this is my first D7 website, made about 5 or 6 D6 websites) so I don't mind some coding solutions to this if any. Just looking for an answer or a push in the right direction.

Since no one has answered yet, I wanted to add that I'm willing to look into alternatives to the central area to manage taxonomies (admin/structure/taxonomy). Maybe I could look into creating a page with Views to simulate the taxonomies admin page.

Is it feasible and has anyone done anything like this before?

share|improve this question
add comment

4 Answers

up vote 5 down vote accepted

I know this was answered a while back, but there's a solution that doesn't require any custom or special modules.

If you disable the core fields ui module, the Manage Fields and Manage Display tabs will not show.

If this is a production site, this should be fine to do as you'll have already configured the fields how you want them. If you ever need to make a change, just enable the module again briefly.

share|improve this answer
1  
+1 This seems like the cleanest, least bulky and quick way to achieve the result. –  Beebee Jul 3 '13 at 8:41
    
+1 great answer. Foolishly, I always jump to code first. –  adam Jul 9 '13 at 15:25
    
Great answer , like ;) –  zhilevan Nov 3 '13 at 11:37
add comment

Use field_ui_permissions module which controls whether "Manage Fields" and "Manage Display" tabs should be displayed or not based on role permissions.

share|improve this answer
add comment

The permission administer taxonomy is what's used to give field permissions, if you need to give them this permission in order to give them access to taxonomy administration you can create a new permission for the field ui.

The easiest way to set this, is with hook_entity_info_alter hook, since this is where the admin path for the field ui is added and the access permission for them. You could also use hook_menu_alter to change the permission, but this is a bit more work.

share|improve this answer
add comment

You might try using the hook_menu_alter() to edit the 'access callback' that are setup in field_ui_menu() function from field_ui.module file. This is where the "Manage Fields" and "Manage Displays" menu items are setup.

In your hook_menu_alter() you could look for these two menu item entries for taxonomy paths (since you would want to keep the Content Type versions of these), and change the 'access callback' to a custom method that checks a new permission you create in hook_permission().

I've done something similar in the past and would be happy to send code if needed.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.