Deprecate user_role_permissions()

Created on 15 March 2023, almost 2 years ago
Updated 28 March 2023, almost 2 years ago

Problem/Motivation

Split from 📌 Deprecate user_role_grant_permissions() and user_role_revoke_permissions() Needs work .

Proposed resolution

user_role_permissions() should be deprecated for removal. There's only one use-case in core and it should be replaced by something like:

  $entities = Role::loadMultiple($roles);
  $role_permissions = [];
  foreach ($roles as $rid) {
    $role_permissions[$rid] = $entities[$rid]?->getPermissions() : [];
  }

Remaining tasks

- revoew/commit

User interface changes

no

API changes

- deprecated user_role_permissions() and internal _user_role_permissions_update()
- PermissionsHashGenerator now require EntityTypeManagerInterface as 4th constructor argument

Data model changes

no

Release notes snippet

📌 Task
Status

Fixed

Version

10.1

Component
User module 

Last updated 5 days ago

Created by

🇬🇧United Kingdom alexpott 🇪🇺🌍

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024