The Flag per Node module extends the Flag module and provides a flexible way to control which flags are visible on which nodes. Flag per Node can define custom flag access for individual pieces of content with a default setting per content type. The code is heavily inspired by the Content Access module, but is specifically applied to flags.
Note that this module never grants permissions to users that are not allowed to use a certain flag, it can only be used to narrow down the permissions.

You will most likely only require this module if you want to control access to specific individual nodes. Access per content type is already part of flag and does not require this module.

Use case

This module was originally built for a site using lots of Drupal book pages with information, in which we recently wanted to add functions for users to flag specific pages in a specific book on a specific level.

With this module you create a flag type that is applicable to nodes and book pages, then you disable the default flag options on the book page content type and you can re-enable the flag permissions on a per node basis. (Or the other way around, set content type permissions and remove them per node.)

How to use

First make sure you create a flag to be set on one or more content types using the Flag UI. Then edit the content type(s), and set the default flagging permissions for all nodes of that type. This can be one of the following combinations:
- Allow flag, allow unflag
- Allow flag, deny unflag
- Deny flag, allow unflag
- Deny flag, deny unflag
Lastly, edit the node you want to override and toggle the flagging permissions for this node only, overriding the content type settings.

Supporting organizations: 

Project information

Releases