I have a site where members (with different roles) can post projects.

My goal : To show to "recruiters" (role) a view of all the users who have flagged their nodes. In other words, the flag accessibility / visibility is dependant of the author's role and node type.

I need :

  1. to show a flag to every user if the author of the node has the role "recruiter"
  2. to let the "recruiter" unflag a user from his view of applicants.

I can't / I can:

  1. I cannot figure out how to control the visibility / accessibility of the flag based on the author's role. I've checked a few modules, but did not find anything relevent yet.

  2. I'm ok with Views: I guess I could make a second flag only for "recruiters" (available in the view) and set a double condition : if user has flagged node AND if "recruiter" has flagged the user in the list, then remove user from the view. By doing this, the user would not be able to flag again the node (job post) if the 'recruiter" has (un)flagged the user.

My hope : to be able to combine available modules (no coding).

I guess a custom module could look for a boolean field (checkbox) only available to some roles and show (or not) the flag. But I'm no coder unfortunately.

Let's start with available modules : is there anything that I missed?


I have the impression that what you're asking for requires more then just (only) the Flag module. I.e. you should get it to work if you also use the Rules Link module.

If you're not familiar with Rules Link, then have a look at "How to show authorized users a link for relevant Views results using the Rules Link module?". The scenario explained in that question is about users that are "blocked" or "active", and which you could consider as a variation of what this question here is about, i.e.:

  • think of "active" users as "users who have flagged their nodes" (as in your question).
  • think of "blocked" users as "unflag a user from his view of applicants" (as in your question).

Of course, you don't want to block or activate users for your case. But instead you could use 2 separate flags:

  • a 1st flag to be used by all the users, to indicate something like "I want to apply for this node" (adapt the label to whatever fits).
  • a 2nd flag to be used by the recruiter to indicate something like "reject a user as an applicant".

Obviously, you could show to "recruiters" (role) a view of all the users who have flagged their nodes (with the "1st flag"). And using Rules Link you could improve that view to trigger some additional Rules magic to simply flag an applicant (with the "2nd flag").

Note: no custom coding needed, only 2 flags to be configured, and some rules magic (combined with Rules Link).

Not the answer you're looking for? Browse other questions tagged or ask your own question.