Problem/Motivation
In this issue we forgot to add a check if a user has access to the overview page.
In general it is a bad (security & ux) practice to show links to items a user doesn't have access to.
Steps to reproduce
- create a taxonomy
- create a user with permission to create/edit terms in this taxonomy
- link to the creation form
- click on the "Save and go to list" button
- a 403 access denied is shown
Proposed resolution
Hide the "Save and go to list" link when a user doesn't have access.
Remaining tasks
Add a check to see if the user has the "Access the taxonomy vocabulary overview page" permission.
User interface changes
In some cases the "Save and go to list" link will be hidden.
API changes
-
Data model changes
-
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | interdiff.txt | 984 bytes | lauriii |
| #9 | 3347816-9.patch | 1.81 KB | lauriii |
Issue fork drupal-3347816
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3347816-only-show-link
changes, plain diff MR !3658
Comments
Comment #2
mpp commentedAdded check on 'access taxonomy overview' permission.
Comment #4
smustgrave commentedThe failures in the MR seem legit ones and not random ckeditor5.
This change will require a test case also to show the issue.
Thanks
Comment #5
mpp commented"This change will require a test case also to show the issue."
The failure actually shows that there is a bug as the current test doesn't provide a user with the 'access taxonomy overview' permission.
Comment #7
aleexgreen commentedFixed the test and added one for the new functionality.
Comment #8
mpp commentedLooks good, thank you.
Comment #9
lauriiiWe could use
#accessfor this which simplifies the if condition. Posting as a patch to test across all branches.Comment #14
lauriiiCommitted 16da1ce and pushed to 10.1.x. Also cherry-picked to 10.0.x and 9.5.x. Thanks!