Skip to content
This repository has been archived by the owner on Aug 25, 2022. It is now read-only.

Proper own any permissions #109

Open
wants to merge 5 commits into
base: 8.x-1.x
Choose a base branch
from
Open

Conversation

idimopoulos
Copy link
Contributor

This is a followup of #107 where the idea of changing strings was rejected. This splits the work that is reverted in that PR.

The idea is that the 'edit' operation is removed. We can now also fix the permission strings that currently have the form of
edit $bundle rdf entity to edit any rdf entity and
edit own $bundle rdf entity to edit the owned entity.
The same applies for the delete operation as well.

@pfrenssen
Copy link
Contributor

Let's still support the old string, but throw deprecation warnings:

if ($account->hasPermission('edit ' . $entity_bundle . ' rdf entity')) {
  trigger_error('Permissions in the format "edit {bundle} rdf entity" is deprecated in RDF Entity 8.x-1.0-alpha19 and will be removed before 8.x-1.0-beta1. Use "edit any {bundle} rdf entity" instead. See https://issue/that/will/remove/deprecation');
  // fallback to old behaviour.
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants