Problem/Motivation

The functionality of this module was added to core in 10.2, which means that permissions should be converted to the ones provided by core once people upgrade to that version.

Proposed resolution

The permissions should be converted to the new permissions provided by core in an update hook. After converting, in case no roles are using permissions provided by this module anymore, we could log a message saying that the module can be removed.

Existing permission New core permission
create
$type_id
block_content
create
$type_id
block content
update own
$type_id
block_content
/
update any
$type_id
block_content
edit any $type_id block content
delete own
$type_id
block_content
/
delete any
$type_id
block_content
delete any $type_id block content
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

dieterholvoet created an issue. See original summary.

dieterholvoet’s picture

Title: Mark the module as obsolete and provide an upgrade path » Provide an upgrade path to the permissions provided by core

Never mind, the module isn't actually obsolete: it provides 'update/delete own' permissions that core doesn't provide. This means that we should create a new version that converts part of the permissions to the ones provided by core, while keeping the others in this module.

dieterholvoet’s picture

What we could do is log a message in the update hook in case no roles are using permissions provided by this module anymore, which means that the module can be removed.

dieterholvoet’s picture

Issue summary: View changes

dieterholvoet’s picture

I implemented the update hook. I tried to let the update hook uninstall the module, but apparently that's not supported (yet): #3063734: Support uninstalling the module providing the update hook in hook_update_N.

larowlan’s picture

This looks good to me - should we bother with an update test?

dieterholvoet’s picture

Writing tests is not my strong suit so I won't probably spend the time, but feel free if you want to.

dieterholvoet’s picture

Status: Needs review » Needs work

We should probably also look into deprecating the outdated permissions. Since there isn't an official way to deprecate permissions yet (see #2924785: Provide a mechanism to deprecate permissions), we could update the label/description.

dieterholvoet’s picture

Almost forgot, but we'll have to bump the minimum core version to 10.1.0 since that's when some of the permissions were added.

  • dieterholvoet committed 48cc00c6 on 8.x-1.x
    Issue #3489678 by dieterholvoet, larowlan: Provide an upgrade path to...
dieterholvoet’s picture

Status: Needs work » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.