granting permissions per vocabulary does not seem to work. It seems to be an all or none proposition. Is this a (critical) bug or I am missing something very obvious?

Comments

rschwab’s picture

Category: bug » support
Priority: Critical » Normal

I think this is just how core works. Have you tried looking for a contributed module for more fine grained taxonomy permissions?

Or do you mean that if you grant permissions to edit/delete vocabulary X, all vocabularies can be edited deleted?

spinoza_gl’s picture

Thanks.

edit/delete by itself does not grant any permissions unless "Administer vocabularies and terms" permission is granted. When that permission is granted, it allows edit/delete on all vocabularies regardless of individual vocabulary permissions. If this is how core is supposed to work then I am trying to figure out the point of a user interface for edit/delete on each vocabulary?

No, I haven't been able to find a module for a more fine-grained vocabulary permissions.

rschwab’s picture

Category: support » bug

I see. That doesn't seem right at all, and I'm probably overlooking something too but I'm having trouble getting taxonomy to work at all even with uid 1.

spinoza_gl’s picture

No it doesn't. It seems to be a seriously misleading UI to show permissions per vocabulary and then not implement it, if that is indeed the case. I would still like to believe that I am missing something here.

If you are logged in as an administrator, you should be able to edit/delete/add vocabularies regardless of being assigned that permission in the Permissions page. That is another confusing UI, if that is how it is supposed to work.

spinoza_gl’s picture

Priority: Normal » Critical
Les Lim’s picture

Priority: Critical » Normal
Status: Active » Closed (works as designed)

The "Administer vocabularies and terms" permission works similarly to the "Administer content" permission, in that it grants full permissions across all vocabularies without having to check each individual box. It also allows access to the administration interface at admin/structure/taxonomy.

The individual taxonomy permissions do not allow access to the administration page (admin/structure/taxonomy). Instead, they are intended to control permissions for individual term pages (i.e., taxonomy/term/3). These permissions are working as described.

spinoza_gl’s picture

Category: support » bug
Priority: Normal » Major

You can give permission to add/edit/delete per content type but you cannot assign permission to add/edit/delete per vocabulary. You can only edit/delete per term

Permissions can be granted on per content type without granting the "Administer content" permission. I gave permissions on content types x, y, etc., to a particular role without granting the general "administer content" permission to this role, and it works as expected. The said role can perform actions on content types x, y without needing the general "Administer content" permission.

However, with vocabularies, that is not the case. In order to edit/delete any vocabulary, the "Administer vocabularies and terms" permission needs to be granted. Granting that permission enables edit/delete on all vocabularies.

FYI, taxonomy permissions do not appear to control permission for individual term pages as you say. My role 'x' has no permissions on taxonomy term 7 for e.g. and it still has access to taxonomy/term/7 and can successfully edit that term. Is that a bug? It seems to be.

strike that: "Administer vocabularies and terms" was still enabled for that role. So that is correct as you say.

I am only trying to allow certain roles to add terms to a few select vocabularies, just as I have been able to assign permissions to add only a few select content types. That is not possible, it seems to me, with the way the vocabulary permissions are currently structured. Not without writing a separate module: my next task.

Thanks for your input.

catch’s picture

Category: bug » support
Status: Closed (works as designed) » Active

Les Lim explained it correctly, I'll try again though:

The behaviour is that when you grant access to individual vocabularies, that gives you access to edit/delete the terms in that vocabulary via taxonomy/term/n/edit pages.

You can not edit/delete the vocabulary itself - i.e. the container that is listed at admin/structure/taxonomy/foo

However this is exactly the same as node type permissions. If you give users access to edit $type permission, they can't get to admin/structure/types either - they can only edit individual nodes of that type.

Les Lim’s picture

Category: bug » support
Priority: Major » Normal
Status: Active » Fixed

Marking as fixed, per #7.

spinoza_gl’s picture

Status: Fixed » Active

I see what Les Lim and you are saying. For node types, I can give permission to add nodes for few node types only. I cannot give permission to add terms only to a few vocabularies. Thanks for your input.

spinoza_gl’s picture

getting caught between replies, sorry. What is missing then is "Create new terms for x" as in vocabulary x similar to content: Create new content".

"fixed" I suppose.

spinoza_gl’s picture

Status: Active » Closed (works as designed)
rschwab’s picture

Category: support » bug
Priority: Normal » Critical
Status: Closed (works as designed) » Active

You should be able to find a contributed module to do what you need, spinoza. Its one of the great parts about Drupal afterall. Here is a list of modules related to permissions for taxonomy terms

rschwab’s picture

Category: bug » support
Priority: Critical » Normal
Status: Active » Closed (works as designed)

doh! I didn't mean to do that...

catch’s picture

Ahh, now I get the issue. The initial patch that added delete/edit permissions added a create permission to, but this went in just before code freeze, and there wasn't time to properly resolve create permissions (needs to handle autocomplete, other widgets don't have any way of adding terms - you can read the background at #340652: Edit/delete terms permission per vocabulary.

It would be worth posting a 'task' against Drupal 8 to add create permissions per vocabulary too. Also nothing stops contributed Drupal 7 modules providing field widgets that allow adding of terms, and exposing permissions for that.

spinoza_gl’s picture

Thanks. I will look into this before I roll my own.

johnv’s picture

Title: Vocabulary permissions » Split Taxonomy permissions into 'Vocabulary' and 'Terms'
Category: support » bug
Status: Closed (works as designed) » Active

The permission 'Administer vocabularies and terms' should be split in 'Administer vocabularies' and 'Administer terms', just as the Node system contains both 'Administer content types' and 'Administer content'.
The 'Administer terms' can then be set per Vcabulary with the existing Edit/Delete permissions.
This way a developer can design the Vocabularies, and the site maintainer can create/edit/rearrange the terms.

The big change between D6 and D7 regarding this issue, is that Vocabularies are now Fieldable. In D6, There was no difference between maintaining Voc's or terms', in D7 is.

According to catch's post #15, the permission system is not complete, so the design of that feature should be amended.
I'll set this to an active bug report, perhaps someone will set it to 'feature request'.
(I didn't find a proper D7 module either)

marcingy’s picture

Version: 7.0 » 8.x-dev
Category: bug » task
mrfelton’s picture

+1 for this. Whilst granting the edit/delete terms permission does give the ability to edit and delete existing terms, it doesn't let you add new ones. Also, there is no easy way to get to the edit/delete term pages unless you have the administer vocabularies permission since you can't access the admin page that lists the vocabularies.

mrfelton’s picture

So, what should the full set of permissions be? I'm thinking following in the light of node.module:

Bypass taxonomy access control
View, edit and delete all vocabularies and terms regardless of permission restrictions. Warning: Give to trusted roles only; this permission has security implications.

Administer vocabularies
Warning: Give to trusted roles only; this permission has security implications.

Administer terms
Warning: Give to trusted roles only; this permission has security implications.

Access the taxonomy overview page

Vocab 1: Create new terms

Vocab 1: Edit terms

Vocab 1: Delete terms

Vocab x: Create new terms

Vocab x: Edit terms

Vocab x: Delete terms

The only one I'm not sure about is Administer terms - presumably it would grant the ability yo create edit and delete terms for any vocabulary? would that have security implications?

Cyberwolf’s picture

Subscribing.

catch’s picture

There's a tab on taxonomy/term pages for editing/deleting terms. I think there are use cases for letting people create new terms via field widgets (autocomplete or select + create). So ideally we want those permissions to make sense without admin permissions - same as they do for nodes now.

likewhoa’s picture

Issue tags: +taxonomy permissions

+1 on separation of vocabulary and term permissions, also subscribing.

droplet’s picture

+1

candelas’s picture

+1 :)
and thanks!

giorgio79’s picture

In addition to #20 I would love to see more granular vocabulary permissions as well:
Administer vocabularies
Create Vocabularies
Edit Vocabularies
Edit Own Vocabularies
Delete Vocabularies
Delete Own Vocabularies
Administer Terms in Vocabularies

awm’s picture

subscribing

moskito’s picture

subscribing

xjm’s picture

@moskito, you don't need to "subscribe" anymore. There is a green "Follow" button in the upper-right corner of the issue that you can click.

kristiaanvandeneynde’s picture

Would love to see this implemented as well.
A combination of #20 and #27 seems great.

Encarte’s picture

#27 seems complicated since terms and vocabularies, unlike nodes, don't have «owners». But #20 is really important, specially the Create new terms permission.

It's strange that you need to give the «Administer vocabularies and terms» permission (which includes adding and removing fields) in order to just allow adding a new term. IMHO, this particular aspect is a major problem.

mrfelton’s picture

We definitely need to get this in core, but those that need this right now in D7 might want to checkout out Taxonomy Access Fix

hibersh’s picture

Priority: Normal » Major

#33 works well
It will be great to gotta this in 8.x

tim.plunkett’s picture

Priority: Major » Normal

I wouldn't say this is major.

lpalgarvio’s picture

agree with #20.

can this be fixed for 7.x or just for 8.x?

interesting module (adds create term per vocab permission and fixes access on taxonomy page):
http://drupal.org/project/taxonomy_access_fix

ParisLiakos’s picture

rschwab’s picture

Status: Active » Closed (duplicate)

Yep, its the same issue, but more progress over there. I'm gonna mark this duplicate and note it on that issue.