Skip to content
Snippets Groups Projects

Issue #3492926: RoleDelegationRemoveRoleUser and RoleDelegationAddRoleUser...

1 unresolved thread

Issue #3492926: RoleDelegationRemoveRoleUser and RoleDelegationAddRoleUser access() method does not honor $return_as_object parameter

Closes #3492926

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
54 54 $access = parent::access($object, $account, $return_as_object);
55 55
56 56 // If access == true, the user already has the administer users permission.
57 if ($access === TRUE) {
57 if ($access === TRUE || ($return_as_object && $access->isAllowed())) {
58 58 return $access;
59 59 }
60 60
61 61 // Check if the user has access to remove the role from the user.
62 return $this->roleDelegationAccessCheck->access($account);
62 $access = $this->roleDelegationAccessCheck->access($account);
  • Code changes look good to me. Tested on fresh Drupal 10.3.10 installation.

    • Created user with "Content Editor" role.
    • Created user with "authenticated user" role.
    • Configured module to allow "Content Editor" users to assign "Content Editor" role.
    • Logged in as "Content Editor".
    • Successfully assigned "Content Editor" role to authenticated user via bulk operation.
  • Please register or sign in to reply
    Loading