I'm using the flag module as a way to sign-up for events, by creating a sign-up flag on all nodes that are type event. (Didn't like the sign-up module) I've made it really far, and it's turning out nicely. However, I'd like to be able to give certain roles permissions to change the flag status of any user, so that certain roles can sign-up other users.

Comments

quicksketch’s picture

Version: 6.x-1.2 » 6.x-2.x-dev
Status: Active » Postponed

This is not likely to happen. Changing another user's flags involves a number of complex UI issues. It can't just be a link any more, since how would you know which user's flags you're changing? This might be possible through some kind of relationship/argument handling in Views, but would still require changes to our menu handlers and the link structure, since right now the UID is implied by the current user. In the mean time, you might try http://drupal.org/project/masquerade to switch to another user.

quicksketch’s picture

Title: Add Role to "Change other User's Flags" » Administrator Role to Change other User's Flags or Flag on behalf another user

Marked #1055970: Flag a node for a user by administrator as duplicate. Giving this issue a better title for searching. I've answered this in a couple of different issues and the problem is still just as difficult as ever. The Flag API is 100% capable of doing this (indeed modules like Flag Friend have been using it for some time), but the UI issues are what prevent this from being available easily. The best solution for this would be an add-on module.

MBroberg’s picture

I managed to do this using Flag, Rules, and a Button Field. In my use case I want to subscribe a parent to class emails when I click a button. Eventually I want this to be automated when their student is added to a class.
The initial registration process involves the parent creating an account and then making student nodes (author is parent account).
Then each child is enrolled in a class by the admin creating a new node that references both the student node and the location node.

A roster is created with a View, and I want to use the roster to flag the class on behalf of the parents. That way I can send class emails to each subscribed parent.
For the first part (click a button) I have done the following steps:

  1. placed a "subscribe" flag on the class (parents can subscribe or unsubscribe at will)
  2. created a button field and added it to the registration node which is used to sign their child up (admin can also subscribe the parent)
  3. use Views to create rosters of students and show their flag status and a button
  4. in "Rules," use the event trigger "when a button is pressed."
  5. The actions are
  • load the referenced student node
  • load the account used to create the student
  • load the referenced class
  • flag the referenced class on behalf of the user account

Eventually the automatic part will happen with a Rule event "When a node is created" so that the parent is subscribed automatically.

MBroberg’s picture

I believe this can be simplified by creating a new node type "subscriptions."
Add a user reference and a node reference, plus 2 button fields: "Subscribe" and "Unsubscribe."
Then make a rule that loads both the user account and the node, and flag or unflag on behalf of the user.

joachim’s picture

Status: Postponed » Closed (won't fix)

> The best solution for this would be an add-on module.

Closing as wontfix -- best place to fix this is a contrib module, as stated above.