Problem/Motivation
As initially proposed here in #1550540: Rules "Permission check" parameters are inverted; should be "Skip permission check" the "Trim a flag" rule action does not provide for permissions to be overridden when doing the trim. Since a trim is effectively a bulk unflag, it seems appropriate to support overrides as the unflag rule action does.
Proposed resolution
Provide this parameter as a checkbox in the rules configuration.
Remaining tasks
Patch rolling shortly, reviews needed
User interface changes
New checkbox for "Skip permission check" in the Trim a flag rule action configuration form.
API changes
The procedural function flag_trim_flag() now accepts $skip_permission_check as an optional argument, defaults to FALSE.
Comment | File | Size | Author |
---|---|---|---|
#2 | flag-feature_skip_permissions_for_trim-1689510-2.patch | 4.87 KB | shabana.navas |
Comments
Comment #1
joachim CreditAttribution: joachim commentedComment #2
shabana.navas CreditAttribution: shabana.navas commentedThe patch for this has been attached. Hope you guys can review it.
Comment #3
shabana.navas CreditAttribution: shabana.navas commentedI think this patch is good to commit. Any of you guys have any opinions before I commit?
Comment #4
shabana.navas CreditAttribution: shabana.navas commentedCommitted to version 7.x-3.x.
Comment #5
Volx CreditAttribution: Volx commentedThis commit introduced an error on line 2140 of flag.module. The line now starts with a +.
Comment #6
joachim CreditAttribution: joachim commentedDunno how that happened -- patch looks fine!
Thanks for reporting this. Fixed :)