Nice module. Will likely be using it for new project. Doing some initial testing, found a couple perm related issues:
1. user which has create subuser perm is shown the Switch link and is able to switch to the subuser even though switch subuser perm is not enabled [screenshot of perm config]
2. (cosmetic) user which has create subuser perm is shown the Edit link which leads to access denied if administer subusers perm is not enabled [screenshot of user page]
3. (cosmetic, possible security issue) user which has administer subuser perm is shown the entire list of user permissions and modules which implement user perm hook; user which has administer subuser perm is shown entire list of user roles beyond those which they can create [screenshot of admin page]
IMO the user permission filter should/could be removed. The user roles filter should be restricted to only roles they have ability to create.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 726914-1-eojthebrave-subuser_permissions.patch | 6.65 KB | eojthebrave |
Comments
Comment #1
eojthebraveThis patch should fix the above issues #1 and #2. In order to get the view to respect the subuser module's permissions I had to implement two new views fields. One for the subuser edit link and one for the subuser switch link.
I then updated the existing view to use these new fields and re-exported it.
I also had to make a couple of minor changes to the subuser_switch_user_access() function so that it now makes use of the 'subuser switch' permission.
Comment #2
robin van emden commentedTested on our development server, did not encounter any show-stoppers.
Comment #3
fonant commentedThis patch works well here, fixing the problem where the permissions didn't affect the links displayed or the ability to switch to a subuser.
Comment #4
jeffreyvddb commentedThe patch works like a charm, but still I've got a question. When you have the 'administer subusers' perm, you can edit the basic information of a subuser. Could it be possible to add a feature that you can block and/or delete a subuser? This way, the parent can manage 'their' subusers.
Comment #5
blakehall commentedAdded to 6.x-1.x with commit: http://drupal.org/commitlog/commit/7940/74dd3e30ae15ed72ccd2c9ddfbca5867...
Thanks eojthebrave!
Comment #6
blakehall commentedDoh! Actually marking fixed now...