On drupal.org we now use the honeypot module, which has a permission that allows users to bypass it. Other antispam modules (mollom, spam) have a similar role.
It would be convenient if admins could assign/remove that specific role using fasttoggle.
This should have a different permission from "administer users" and should only work for a specifically chosen role.
| Comment | File | Size | Author |
|---|---|---|---|
| #13 | 1776878.patch | 24 KB | killes@www.drop.org |
Comments
Comment #1
greggles"should only work for a specifically chosen role." - specifically chosen in fasttoggle interface, right? It seems useful to be able to enable multiple roles for this feature and show a fasttoggle link for each one.
Comment #2
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedI won't complain about multiple roles. I am looking at the module to figure things out. Not sure it supports two parameters (uid, rid) out of the box.
Comment #3
killes@www.drop.org CreditAttribution: killes@www.drop.org commenteda single role would probably be easier to do.
Comment #4
nigelcunningham CreditAttribution: nigelcunningham commentedSounds to me like the best way to implement this would be adding a permission per role named something like fasttoggle_role_rolename. Sound good?
To make sure I understand what you're thinking correctly, you're imagining extra links alongside the block/unblock link on user/view page? How about also in admin/user/user?
Comment #5
gregglesI think it would be most useful in this case as a Views field, but yes, putting it alongside the user/view page would be nice. I don't think it's required on admin/user/user - that table is already huge and someone who needs more control of it should build their own view.
Comment #6
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedMoving this to D7 as it looks d.o will soonish convert to that.
Comment #7
nigelcunningham CreditAttribution: nigelcunningham commentedThanks. Work is underway; just not complete yet.
Comment #8
nigelcunningham CreditAttribution: nigelcunningham commentedImplemented in the latest commit to 6.x; now I'm going to port it to 7.x before working on a cleanup patch for both versions. This has required reworking things a bit, but I think it should give us cleaner, more generic code in the end (less duplication too!)
Comment #9
nigelcunningham CreditAttribution: nigelcunningham commentedOh. Sorry. Forgot the 6.x->7.x change so it's not fixed yet.
Comment #10
gregglesComment #11
nigelcunningham CreditAttribution: nigelcunningham commentedPort to D7 committed to git. I've tested it, but wouldn't mind others checking it over too.
Comment #12
gregglesI think role names should be passed through check_plain in the permission names.
Comment #13
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedHi Nigel,
thank you for working on this!
Unfortunately, I totally missed the commit and instead fixed all role assignments manually. I could kick myself!
I've tried the D6 version and in addition to what Greg said, I've found a few bugs. Uploading your patch so I can dredit it.
Comment #14
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedThe role options are missing
I guess this is a typo in the variable name, needs to be _role_ not _user_
Shouldn't this take the admin setting into account?
Here you use "toggle role 'foo'"
Coding style! ;)
Here you use "fasttoggle role foo" for the permission. obviously you need to standardize.
I think this need to be reversed, it is not working exactly opposite: "add role" takes is away and "revoke" adds it.
Comment #15
nigelcunningham CreditAttribution: nigelcunningham commentedThanks for the feedback. I'll seek to apply it asap.
Comment #16
nigelcunningham CreditAttribution: nigelcunningham commentedThanks for the feedback.
I believe this issue is now fixed in current 7.x dev. Please give it a whirl if you have time.
Comment #17
gregglesany chance you could fix 6x too? it's likely d.o will be on it for a while longer.
Comment #18
nigelcunningham CreditAttribution: nigelcunningham commentedOk.
Comment #19
nigelcunningham CreditAttribution: nigelcunningham commentedDone.
Comment #20
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedNigel, thanks for your help! THis is now live on d.o and will make maintenance lot easier.