Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295813

Implement a generic revision access API

$
0
0

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:

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

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 295813

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>