Problem/Motivation
The 1.5 security release proposed in https://www.drupal.org/sa-contrib-2026-002 breaks the user edit form display. Before the Update (Tested on 1.3 and 1.4) the role_change field was placed where the default role field would be placed as well – At the top, next to the user´s default fields like status.
After the update to 1.5, the role_change field appears at the very bottom of the user edit form.
Altering the #weight with a form_alter for the user edit form does not have any effect.
Steps to reproduce
- Install Role delegation 1.5
- Create and place fields on the user edit form
- Find that role_change now appears at the bottom of the page instead of where it belongs
Proposed resolution
- Find out what causes the position change
- Provide a patch for a quick solution (!) User should be able to update to 1.5 for security reasons!
- Release a fixed version
Issue fork role_delegation-3567638
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
Comment #2
kevinkonsorr commentedComment #3
dieterholvoet commentedThat will probably be the result of #3387126: Users need 'administer permissions' to edit roles on the user edit page. The issue there was that the
role_changefield is assigned to the account group (the 'User name and password' field). If this is hidden in form display, the role_change field is hidden as well because it's assigned to a non-existing field group. We can add the$form['role_change']['#group'] = 'account';line back, but we'll need to figure out some kind of check to make sure the group is only changed if the group is visible.Comment #4
dieterholvoet commentedComment #6
dieterholvoet commentedI implemented a possible fix, could you test the MR?
Comment #8
dieterholvoet commented