Problem/Motivation

If you create a taxonomy and then a user who can only edit the terms of the taxonomy and use the admin toolbar, the link to edit the taxonomy is not shown anywhere. The user can edit the taxonomy, so far the rights work, but under drupal 7 the structure link in the toolbar was shown and inside the taxonomy links where shown. The taxonomy could be reached by the toolbar, this is not the case in d8.

Steps to reproduce

1)Create a new user role named "Taxonomy Editor."
2)Assign the "Tags: Edit terms" permission to this newly created role.
3)Generate a user account with the "Taxonomy Editor" role and log in using these credentials.
4)Upon login, observe that the user cannot access the taxonomy edit page from toolbar.
5)Assign an additional permission, "Access administration pages."
6)Following this update, both the structure and configuration menus become visible in the toolbar for users with the "Taxonomy Editor" role.

Proposed resolution

TBD

Remaining tasks

Agree on solution

User interface changes

TBD

API changes

TBD

Data model changes

TBD

Release notes snippet

TBD

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

reptilex created an issue. See original summary.

reptilex’s picture

Issue summary: View changes
hiramanpatil’s picture

@reptilex,

Are you using admin_menu module in D8?

reptilex’s picture

@hiramanpatil not on this project.

jouri’s picture

I'm working on this at drupalcon Dublin

jouri’s picture

Issue tags: +Dublin2016

I'm working on this at drupalcon Dublin

Version: 8.1.1 » 8.1.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Version: 8.1.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Kristen Pol’s picture

Issue tags: +Bug Smash Initiative

Triaging for Bug Smash Initiative.

Kristen Pol’s picture

Status: Active » Closed (works as designed)
Issue tags: -toolbar taxonomy permissions
FileSize
117.77 KB

I've tested this on 9.2 and the user can access the taxonomy page through the toolbar if you configure these permissions:

  1. Use the administration pages and help
  2. Tags: Edit terms (or whatever vocabulary)
  3. Access the taxonomy vocabulary overview page
  4. Use the toolbar

See screenshot for what the user sees with these enabled.

If this is an issue on an earlier Drupal version, please reopen and specify which one(s). Thanks!

ultrabob’s picture

Status: Closed (works as designed) » Active

I'm sorry to reopen this after it has been closed for 2 years, but I do think it is still relevant.

In my testing, the "Use the administration pages and help" permission also controls access to the configuration admin menu, whether the user has access to anything inside it or not. So if I want the user to be able to edit taxonomy terms through the admin menu, but not have a configuration menu showing all the sub-menus, but with no actual content. I can't do it because disabling "Use the administration pages and help" disabled the structure menu altogether, even while the user has permission to do things in it.

anweshasinha’s picture

FileSize
564 bytes

Hi,
I have worked in the issue and created a patch. I have tested the patch in 10.2.x and added the following permission to allow the user access the taxonomy pages:-
1. Tags: Edit terms (or whatever vocabulary)
2. Access the taxonomy vocabulary overview page.

Pere Orga’s picture

Version: 8.9.x-dev » 10.2.x-dev
ultrabob’s picture

@anweshasinha Thank you, that is really great. I think the permission filter on the route needs to read _permission: 'access administration pages,access taxonomy overview' instead of _permission: 'access administration pages+access taxonomy overview'.

With that change, the patch fixes the issue I was having.

anweshasinha’s picture

Hi @ultrabob,
Thank you for your suggestion but if we use ',' instead of '+' in permission filter then, to enable 'Structure' link in the toolbar, we will require both the permissions 'access administration pages,access taxonomy overview'. And the user role having both the permission will only be able to access the 'Structure' link. But 'access administration pages' permission should only be given to 'Administrator' role rather than other roles. So I think , its better that we use '+' instead of ',' in the permission filter.
Please let me know your thoughts.

ultrabob’s picture

@anweshasinha you are exactly right. I misread the change request on that option, when my initial testing didn't work as I expected. I just went back to recheck, and confirmed that it works the way your patch has it, and doesn't work with the ','.

Sorry for the confusion.

shalini_jha’s picture

Version: 10.2.x-dev » 11.x-dev
Status: Active » Needs work
FileSize
39.08 KB

Hi, I have been able to replicate the issues in version 11.x. When the "Use the administration pages" and "Tags: Edit terms" permissions are checked, it displays the structure and configuration. However, if the "Use the administration pages" permission is not enabled, the taxonomy overview page will not be visible from the toolbar.

I tested it with the provided patch #12, and it works when only the "Tags: Edit terms" and "Access the taxonomy vocabulary overview page" permission is checked. It only displays the structure menu, and once I clicked on structure, the taxonomy overview page is visible.
if both the "Tags: Edit terms" and "Use the administration pages" permissions are not checked, the structure menu is still displayed if "Access the taxonomy vocabulary overview page" permission is checked.

I have included a screenshot for your reference

shalini_jha’s picture

Status: Needs work » Needs review
Sandeep_k’s picture

I've tested this on Drupal version- 11.x, sharing my testing results below-
I have created one more taxonomy with "Tags", created a new user & updated the taxonomy edit permissions as mentioned. After logging in from that user the Structure option was not showing for me.
Even after applying the patch #12 the Structure menu still not showing for me, I have unchecked the other term edit option & kept edit permission for the "Tags" only but the results are still the same for me. Not showing structure menu for that edit user. Sharing screenshot for reference-

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update, +Needs tests

This will need an issue summary update to use standard issue template

Will need test coverage

shalini_jha’s picture

Issue summary: View changes

Updated the issue summary by using standard issue template

@Sandeep_k after applying the patch #12 you need to check one more permission "Access the taxonomy vocabulary overview page" with "Tags: Edit terms".then only structure toolbar menu will visible.

Sandeep_k’s picture

Thanks, @shalini_jha, After allying the patch #12 & clicking the "Access the taxonomy vocabulary overview page" permission Structure menu is showing now for the user.
And, if both the "Tags: Edit terms" and "Use the administration pages" permissions are not checked, the structure menu is still displayed while the "Access the taxonomy vocabulary overview page" permission is checked, but won't be allowed to make any changes (only view access is shared)

djsagar’s picture

Title: toolbar does not show taxonomy links » Taxonomy Links Not Displayed in Toolbar
Issue tags: -Needs issue summary update

Issue summary updated, removing tag