Problem/Motivation

Currently there is only 3 permissions in this module - adminster, create, and edit. To delete, view revisions, revert revisions, or delete revisions you must have the adminster permission. This also allows access to field_ui, etc.

The paragraphs_library view's access is also set to the administer permission, and the browser view has no access restrictions at all (this should probably be fixed in a separate issue.

Proposed resolution

Add the following permissions:

  1. delete paragraph library item
  2. view paragraph library item revision history
  3. view paragraph library item revision
  4. revert paragraph library item revision
  5. delete paragraph library item revision

And update the route access to allow access either either these permissions OR the adminster one.

Issue fork paragraphs-3340086

Command icon 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

acbramley created an issue. See original summary.

acbramley’s picture

Status: Active » Needs review

Test only commit up (with the permissions)

dgsiegel’s picture

As we needed this patch for our composer setup and couldn't trust Gitlab to always deliver the same file, I've reuploaded @acbramley's patch. All credit belongs to him.

pascuperbla’s picture

A modification has been uploaded to the patch to change the behavior of the library paragraph deletion permission.

Previously, deleting a paragraph from the library was only available with library administrator privileges or the new delete permission. In practice, however, the action was always available because library administrator privileges are required to view library paragraphs.

nessthehero’s picture

Status: Needs review » Needs work

Tried out the patch in #5.

We have a role of an editor which needs to be able to create paragraph library items but should not administer the library itself. Without the "administer paragraphs library" permission, they cannot access the content overview screen, which means unless we manually add a "Add Paragraph" link to the admin menu, they cannot create any library items using simple navigation through the interface.

There should be a separate permission entirely for accessing the paragraph library overview (/admin/content/paragraphs).

yashaswi18 made their first commit to this issue’s fork.

nils.destoop made their first commit to this issue’s fork.

acbramley changed the visibility of the branch 3340086-expand-permissions-overview to hidden.

acbramley’s picture

Status: Needs work » Needs review

Rebased my original MR and hid the new branch that was identical. Re #6 I think that could be a separate issue, most of the time this list would be overridden with a view anyway so you can customise the permission there.