Closed (duplicate)
Project:
Flag
Version:
6.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
17 Aug 2010 at 13:05 UTC
Updated:
27 Oct 2010 at 10:52 UTC
Hello,
I was wondering if there is currently a way for an admin to 'lock' a node from any changes to further flag/unflag the node by users? If not I would like to kindly request this feature as I believe it can be used in many different ways.
One example: Use a flag to allow users to 'Vote' on a node, but after 1 week freeze further changes (flagging/unflaggin)
Thanks!
Comments
Comment #1
quicksketchThis is currently possible through the API (through hook_flag_access()), but there's no exposed functionality to the user to do this. Really what it would probably be would be a flag (say "lock") that disables further flagging. You could also use a CCK field I suppose. So this is possible and not even very difficult, but I'm not sure that such a specific functionality is appropriate to include directly in Flag. There are a LOT of common use cases for Flag, and if we included them all, the module would start to develop cruft of functionality you had to remove or never used.
Comment #2
YK85 commentedHi quicksketch,
A 'lock' flag that can only be accessed by admin I can create. But I'm not sure how to make this flag freeze the flagging/unflagging of the other flags on the node by authenticated users.
Yea, flag module can be used in so many use cases and is such a powerful feature to have.
You're awesome work is very much appreciated!
Thanks
Comment #3
mooffie commentedyaz085,
There's now a handbook page explaining about hook_flag_access().
Our API page explains how to determine if a some node is flagged by a certain flag.
At alternative to hook_flag_access() is: #952114: Have hook_flag_validate(). I'm marking this a duplicate of that one.