You are here

protected constant NodeAccessControlHandler::REVISION_OPERATION_MAP in Drupal 10

Map of revision operations.

Keys contain revision operations, where values are an array containing the permission operation and entity operation.

Permission operation is used to build the required permission, e.g. 'permissionOperation all revisions', 'permissionOperation type revisions'.

Entity operation is used to determine access, e.g for 'delete revision' operation, an account must also have access to 'delete' operation on an entity.

File

core/modules/node/src/NodeAccessControlHandler.php, line 52

Class

NodeAccessControlHandler
Defines the access control handler for the node entity type.

Namespace

Drupal\node

Code

protected const REVISION_OPERATION_MAP = [
  'view all revisions' => [
    'view',
    'view',
  ],
  'view revision' => [
    'view',
    'view',
  ],
  'revert revision' => [
    'revert',
    'update',
  ],
  'delete revision' => [
    'delete',
    'delete',
  ],
];