One of the things that frustrates me when using drupal is the access control feature. I think the basic idea is fine; it's just that the UI for the access control panel (a grid of checkboxes) can be cumbersome to work with when you have multiple non-standard roles defined.
My straightforward solution is to prepend the text "allow [role name] to " the tooltip text for the checkbox.
For background and details, see my write-up on twogrunts.com.
Note: this is my first attempt at submitting a patch to anything in the drupal project, core or otherwise. I'm a newbie (to drupal and PHP), so please, let me know if I'm taking the wrong approach here, or if there's an easier way to do this. In particular, I wasn't sure what project and component to assign this to.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | user.module.patch_3.txt | 1.29 KB | mcurry |
| #8 | user.module.patch_2.txt | 1.54 KB | mcurry |
| #7 | user.module.patch_1.txt | 1.55 KB | mcurry |
| #6 | drupal-access-control-with-new-hover.patch_0.txt | 1.55 KB | mcurry |
| drupal-access-control-with-new-hover.patch.txt | 1.67 KB | mcurry |
Comments
Comment #1
gregglesThis is very similar to the goal of http://drupal.org/node/28301 though 28301 which should have been implemented in http://drupal.org/node/44379 but it seems to have fallen out of that issue.
Basically, there's lots of people who agree this is a good idea, though moshe's comment#13 on 28301 seems to indicate that it should be simpler than the patch by inactivist.
Comment #2
mcurry commentedAwesome! I had a feeling this wasn't new. And I'm glad to see that there's a cleaner way to implement this.
So, this raises one question (for me, anyway) - why do useful patches like this not make it into the mainline releases? Is there something that we need to do in order to ensure that something like this makes it into the next 4.7.x release?
-Mike
Comment #3
drummThe comment should be a simple description/explanation of what is happening. Save the personal pronouns or proposals for here.
The use of t() needs some work. See http://api.drupal.org/api/HEAD/function/t.
Comment #4
drummRelated issue: http://drupal.org/node/78808. I think both changes are okay (if code review checks out of course).
Comment #5
mcurry commentedWill fix.
Would you mind elaborating?
Thanks.
Comment #6
mcurry commentedOk, here's my latest patch against 4.7 cvs.
- Cleaned up comments
- Proper use of t() (please review and confirm)
Comment #7
mcurry commentedThis is the same as the previous patch, except uses '%role : %perm' as the format string, which is more appropriate (for example, the adsense module has a permission of "hide adsense" which, in the previous patch, would result in "allow %role to hide adsense" - and is totally incorrect.)
Comment #8
mcurry commentedPatch diff'd against DRUPAL-4-7 tag. (I suspect I was not using CVS correctly on previous diffs. Still trying to get a clue. Let me know if I'm unsuccessful.)
Comment #9
nedjoMoving to Drupal project. Should use
user_roles()to load the available roles.Comment #10
mcurry commentedGood catch. Still learning the APIs. Thanks.
Here's the updated patch against 4.7.
Should I be running the patches against the latest CVS (HEAD) ?
Comment #11
dries commentedI think Neil's approach is the better one here -- it much more intuitive. Often times people don't see these tooltips (eg. I have them disabled) or it takes 2 seconds for them to show up.
Tempted to mark this duplicate of http://drupal.org/node/78808.
Comment #12
killes@www.drop.org commentedI prefer Neil's approach too.
Comment #13
drummTheres no reason why we can't do both.