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.

Files: 
CommentFileSizeAuthor
#2 flag-feature_skip_permissions_for_trim-1689510-2.patch4.87 KBShabana Blackborder
PASSED: [[SimpleTest]]: [MySQL] 266 pass(es).
[ View ]

Comments

Version:7.x-2.x-dev» 7.x-3.x-dev

Assigned:c4rl» Shabana Blackborder
Status:Active» Needs review
StatusFileSize
new4.87 KB
PASSED: [[SimpleTest]]: [MySQL] 266 pass(es).
[ View ]

The patch for this has been attached. Hope you guys can review it.

I think this patch is good to commit. Any of you guys have any opinions before I commit?

Status:Needs review» Fixed

Committed to version 7.x-3.x.

Status:Fixed» Needs work

This commit introduced an error on line 2140 of flag.module. The line now starts with a +.

Status:Needs work» Fixed

Dunno how that happened -- patch looks fine!

Thanks for reporting this. Fixed :)

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.