Set perms on settings submit and improve documentation
Bevan - February 13, 2008 - 09:12
| Project: | Admin Role |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Description
This patch changes adminrole so that permissions are also set when the admin settings form for Admin Role is submitted. It also adds to documentation of functions and in the interface, and tidies up whitespace for better code readability.
| Attachment | Size |
|---|---|
| adminrole_update_perms_on_settings_submit.patch | 2.54 KB |

#1
Thanks Bevan!
I noticed one small bug though, you were referencing the wrong form_id when setting the callback.
Re-rolled the patch.
One problem though is that when switching roles, you really end up with two admins. We should probably remove the previous role's perms when a switch is made... what do you think?
#2
Ah! Yes. I later realized that I had not tested it properly and my patch wasn't in fact even working!
I rerolled my patch with the one functional difference between your and my patches:
- if (in_array($form_id, array('system_modules', 'adminrole_update_perms'))) {+ if (in_array($form_id, array('system_modules', 'adminrole_admin_settings'))) {
In your patch you had reverted a bunch of minor documentation and whitespace changes that I made.
#3
Thanks! Finally in.
#4
#5
Automatically closed -- issue fixed for two weeks with no activity.