I am using "Flag (or unflag) a node (flag_node_action)" in VBO to unflag nodes on behalf of the user who flagged the nodes, but when I execute the action it flags the nodes on behalf of the admin, also I made a component in rules to do the same thing but for some reason its not available in VBO view, I had another component which used to show up in the VBO actions but after the recent update that does not show up as well, can someone shed some light on this plz. thank you

CommentFileSizeAuthor
#6 custom-flag-actions-1468334.txt6.88 KBluketsimmons

Comments

bojanz’s picture

Project: Views Bulk Operations (VBO) » Flag
Version: 7.x-3.0-rc1 » 7.x-2.x-dev
Component: Actions » Actions integration

Then this is a support request for the Flag module, which provides the mentioned action (flag_node_action).

As for a component not appearing, you either didn't create it properly (first param needs to be the entity type such as "node", or just "entity'), or it's a permissions problem (try retesting as admin).

quicksketch’s picture

VBO to unflag nodes on behalf of the user who flagged the nodes

Flag does not provide an option to do this. Flag always runs as the user who is currently on the site.

Desi Raaj’s picture

ok thank you

joachim’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Category: support » feature

Making this a feature request, in case someone wants to work on it.

joachim’s picture

Status: Active » Closed (won't fix)

That falls in the realm of flag delegation, which has cropped up in other issues.

Overall, this is something I'd rather was tackled by a separate contrib module that provides various things for flagging things on behalf of other users. See #1473716: Manipulating per-user flags as another account.

luketsimmons’s picture

Status: Closed (won't fix) » Active
StatusFileSize
new6.88 KB

Hi all,

So I kinda spent time working on this a month back and didn't have time to post it up.

Attached is an include file with all the actions hooks used for creating a custom flag that will bypass the check for the user who set the flag being the one actioning the unflag.

It's possibly a bit rough around the edges, but it allowed me to set up a flag action to use with a VBO view that meant the admin user (or user with permission to run the VBO) could unflag content flagged by other users. The use case was for people to report content by flagging it, then admins unflagging when report was cleared. Similar to Flag abuse, but we used Flag note with it and Flag abuse meant resetting flags on the content, however we required multiple flagging from different users to be reviewed individually.

Anyway have a look, see what you think. It's loaded with a module_load_include in a custom module.

Thanks,
luke

luketsimmons’s picture

Status: Active » Closed (won't fix)

Ha, hey joachim,

Apologies, I think we must have been typing our posts at the same time, I didn't see your update!

Should we just leave my example here as I see you have linked back to this thread from #1473716: Manipulating per-user flags as another account ?

Thanks,
luke