Closed (fixed)
Project:
Block Access
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Nov 2024 at 17:14 UTC
Updated:
9 Apr 2025 at 16:24 UTC
Jump to comment: Most recent
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.
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 |
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
Comment #2
dieterholvoet commentedNever 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.
Comment #3
dieterholvoet commentedWhat 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.
Comment #4
dieterholvoet commentedComment #6
dieterholvoet commentedI 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.
Comment #7
larowlanThis looks good to me - should we bother with an update test?
Comment #8
dieterholvoet commentedWriting tests is not my strong suit so I won't probably spend the time, but feel free if you want to.
Comment #9
dieterholvoet commentedWe 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.
Comment #10
dieterholvoet commentedAlmost 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.
Comment #12
dieterholvoet commented