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

quicksketch’s picture

This 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.

YK85’s picture

Hi 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

mooffie’s picture

Status: Active » Closed (duplicate)

yaz085,

There's now a handbook page explaining about hook_flag_access().

I'm not sure how to make this flag freeze the flagging/unflagging of the other flags

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.