Problem/Motivation
At present we don't have a generic entity API for determining revision support for operations such as:
- view
- delete
- revert
- edit
Node module defines the following permissions:
- delete all revisions
- revert all revisions
- view all revisions
But these are silver-bullet permissions, they don't allow granular access (per node-type, per entity etc).
The test entities in core don't do anything with revision (their routing has access: TRUE)
These entities don't have any UI for viewing/reverting/deleting revisions:
- media
- block content
- taxonomy
- menu link content
This is now starting to be a hard blocker for further generic improvements in core including:
- #2350939: [PP-1] Implement a generic revision UI
- #2795279: [PP-4] [META] Revisions support
- #2925532: Provide bulk action to delete all old revisions of an entity
Proposed resolution
Option 1
Define a new revisionAccess
method on entity access controller and EntityInterface which has the same signature as ::access
but logic that is specific to the revision passed.
Option 2
Add new operations to the existing ::access
signature such as
- delete revision
- update revision
- view revision
Remaining tasks
Discuss, decide, patch