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
Comment | File | Size | Author |
---|---|---|---|
#22 | Screenshot 2024-02-06 at 10.55.14 AM.png | 138.97 KB | Sandeep_k |
#19 | Screenshot 2024-02-01 at 10.55.11 AM.png | 66.28 KB | Sandeep_k |
#17 | Screenshot from 2024-01-30 14-39-33.png | 39.08 KB | shalini_jha |
#12 | 2735063_12.patch | 564 bytes | anweshasinha |
#10 | Screen Shot 2021-07-30 at 4.02.41 PM.png | 117.77 KB | Kristen Pol |
Comments
Comment #2
reptilex CreditAttribution: reptilex commentedComment #3
hiramanpatil CreditAttribution: hiramanpatil at Clarion Technologies commented@reptilex,
Are you using
admin_menu
module in D8?Comment #4
reptilex CreditAttribution: reptilex commented@hiramanpatil not on this project.
Comment #5
jouri CreditAttribution: jouri at TUI commentedI'm working on this at drupalcon Dublin
Comment #6
jouri CreditAttribution: jouri at TUI commentedI'm working on this at drupalcon Dublin
Comment #9
Kristen PolTriaging for Bug Smash Initiative.
Comment #10
Kristen PolI've tested this on 9.2 and the user can access the taxonomy page through the toolbar if you configure these permissions:
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!
Comment #11
ultrabob CreditAttribution: ultrabob at Kalamuna for OCASI commentedI'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.
Comment #12
anweshasinha CreditAttribution: anweshasinha at Valuebound for Valuebound commentedHi,
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.
Comment #13
Pere OrgaComment #14
ultrabob CreditAttribution: ultrabob at Kalamuna for OCASI commented@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.
Comment #15
anweshasinha CreditAttribution: anweshasinha at Valuebound for Valuebound commentedHi @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.
Comment #16
ultrabob CreditAttribution: ultrabob at Kalamuna for OCASI commented@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.
Comment #17
shalini_jha CreditAttribution: shalini_jha at QED42 for QED42 commentedHi, 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
Comment #18
shalini_jha CreditAttribution: shalini_jha at QED42 for QED42 commentedComment #19
Sandeep_k CreditAttribution: Sandeep_k at QED42 for Drupal India Association commentedI'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-
Comment #20
smustgrave CreditAttribution: smustgrave at Mobomo commentedThis will need an issue summary update to use standard issue template
Will need test coverage
Comment #21
shalini_jha CreditAttribution: shalini_jha at QED42 for QED42 commentedUpdated 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.
Comment #22
Sandeep_k CreditAttribution: Sandeep_k at QED42 for Drupal India Association commentedThanks, @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)
Comment #23
djsagar CreditAttribution: djsagar at OpenSense Labs commentedIssue summary updated, removing tag