Problem/Motivation
\Drupal\taxonomy\TermAccessControlHandler::checkAccess doesn't handle the 'view all revisions'
The accesscheck for Terms doesn't use the new 'view all revisions' permission yet. This should be implemented. (see #3043321: Use generic access API for node and media revision UI)
We notices this in: #3031271: Support version negotiation for any entity type (currently only Node & Media are supported)
I think this work might be done here: #2350939: Implement a generic revision UI, but i think a split might be good, since getting UI into core is a lot harder than this fix.
Steps to reproduce
Proposed resolution
Implement 'view all revisisons', operation check in TermAccessControlHandler by adding a new 'view term revisions' permission
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | interdiff_09_11.txt | 4.06 KB | sandeepsingh199 |
| #9 | view-all-revisions-permission-3269029-9.patch | 9.11 KB | samitk |
| #11 | 3269029-11.patch | 5.42 KB | sandeepsingh199 |
| #13 | view-all-revisions-permission-3269029-13.patch | 9.08 KB | samitk |
Issue fork drupal-3269029
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:
Comments
Comment #2
bbralaComment #3
larowlanI don't see any taxonomy changes in #2350939: Implement a generic revision UI
Looking at TermAccessControlHandler, its not clear what we'd do for this operation.
I suspect rather than defer to either 'administer taxonomy' we'd probably need to add new permissions. Tagging for 'needs subsystem maintainer review' for their input on that.
The basis that we need a discussion on how to handle this is one reason not to hold up #3031271: Support version negotiation for any entity type (currently only Node & Media are supported). But it begs the question, is #3031271: Support version negotiation for any entity type (currently only Node & Media are supported) useful at all for terms if you need to grant the 'administer taxonomy' permission? I don't think it is.
Comment #4
catchAdding a new permission to make taxonomy more in line with other modules makes sense to me.
Comment #5
larowlanThanks, tagging for Novice
Comment #8
samitk commentedComment #9
samitk commentedPatch for:
Comment #11
sandeepsingh199 commentedFixed #9 issue. Kindly check & review.
Comment #12
bbralaHi, thanks for the change?
I did see you remove the tests, shouldnt those stay and be fixed?
Comment #13
samitk commentedFixing issue of #9
Comment #14
samitk commentedComment #15
samitk commentedIn #13 I fixed following.
Thanks @sandeepSingh199 for your input
Comment #16
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.
Think has this is adding a new ability it will need a change record.
Ran the tests locally without the fix and get a valid failure
Comment #21
silverham commentedAdd related issue where even if revision can be fetched via JSON:API, the first one is cached. #3149854: Add revision ID to "jsonapi_normalizations" cache keys