this patch takes advantage of new features in 5.0, and adds roleassign capabilities to the user administration interface for:
- creation of new users
- mass editing of roles
the standard roleassign logic has been added for these, one on the admin user registration page, and one via the new hook_user_operations. like the original workflow, the code is bypassed if the user admin already has 'administer access control' perms.
also fixed a small bug where a user with 'assign roles' perm but not 'administer users' perm had access to the assignable roles.
marking as critical becase at the very least, this module should be taking advantage of the new mass editing feature!
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | roleassign_2.patch | 829 bytes | hunmonk |
| roleassign_1.patch | 7.81 KB | hunmonk |
Comments
Comment #1
TBarregren commentedThe patch works fine. I have commited it to HEAD.
I noticed that some code has become repeated at several places. I therefore consider refactoring. If I do, I will post a message here.
Many thanks to hunmonk for this patch and patch #89333 that ports RoleAssign to 5.0.
Comment #2
hunmonk commentedi considered refactoring for this patch as well, but though i should leave that up to the module maintainer... :)
Comment #3
TBarregren commented:-)
I have made a substantial refactoring of roleassign_form_alter() and roleassign_user_operations(). Some of the improvements of roleassign_user_operations() could with advantage also be applied to user.module. I also took the opportunity to overhaul source code comments and fix some other minor details.
The new version is available from the repository.
Comment #4
hunmonk commentedyour recent patch of cosmetic changes broke the roleassign feature for user admins adding roles when creating new user accounts. attached patch corrects. tested as working.
Comment #5
TBarregren commentedArgh! I overwrote the line with the corresponding line from DRUPAL-4-7 by mistake. I must get a grip of myself and start with unit testing.
Thanks again hunmonk for keeping an eye on me. :-)
Comment #6
TBarregren commentedI've checked in the fix.
Comment #7
(not verified) commented