Currently available permissions as provided by this module are:

  • Create new block content
  • Delete any block content
  • Edit any block content

It is possible to extend and provide Edit own & Delete own block permissions using the revision_user column from block_content_revision table.

Comments

Gaurav_drupal created an issue. See original summary.

gaurav_drupal’s picture

StatusFileSize
new6.72 KB

Attaching the patch for granular permissions for blocks.

gaurav_drupal’s picture

Status: Active » Needs review
gaurav_drupal’s picture

Assigned: gaurav_drupal » Unassigned
joshua.roberson’s picture

StatusFileSize
new3.42 KB

My main concern is that, to my knowledge, there is no way to manage block content revisions through the UI yet. You can create a new revision, but not manage them. The future of this functionality for block content is uncertain.
https://www.drupal.org/project/drupal/issues/1984588

My other concern is that this patch adds the revision user id to block content going forward, so older block content won't have a revision user id for non admins. This feature will only work for block content created after this patch. If someone were to install this patch and switch their roles from "edit/delete all" to "edit/delete own", the affected users won't be able to modify any block content that they may have created.

I had to modify the patch to get it to work. Give it a try and see if it works for you.

There is one major flaw I found. If one user creates block content and another user edits it while selecting "Create new revision", the original creator won't be able to modify it anymore if they only have "edit/delete own" permissions. The new revision in the "block_content_revision" table has the "revision_user" set to the second user. I would expect "edit/delete own" to allow you to modify content you created for the life of your content.

josephdpurcell’s picture

Title: Granular Permissions for Blocks » Edit and Delete Own Permissions for Blocks

Modifying title to clarify the difference of this ticket with: #3045948

joshua.roberson’s picture

Status: Needs review » Closed (works as designed)

Given there will be issues mentioned in #5 and there are no plans to add the "edit own" and "delete own" permissions to core (https://www.drupal.org/node/1975064), I am going to close this issue as "works as designed".