I've created a patch to add the ability to assign a role the permission "adminster audience". This permission, when selected, would give the role the ability to add a post to any audience just like if the user had the "administer nodes".

This is nice because I have users that I need to give this ability to but I don't want them to have the "administer nodes" permission.

Please comment if there is something I can do to get this patch integrated into the project.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ice5nake’s picture

Before creating this patch I posted this question, http://drupal.stackexchange.com/questions/6406/how-do-you-allow-a-user-t...

ice5nake’s picture

Is there anything I can do to help get this patch reviewed and incorporated into Organic Groups?

cjamesrun’s picture

This is something that I would like to have. In the circumstance I was looking for ... I wanted someone to be able to submit a group post and then a moderator later would publish it, selecting the appropriate audiences.

dddbbb’s picture

I'd love to see this too (in D7).

ice5nake’s picture

@cjamesrun, did you try the patch I posted? It's pretty straight forward.

Grayside’s picture

This seems like a very narrow permission, is the goal really just administrating audience, or is the goal to create a class of users that can administrate all groups, audience of this or that post and incidental part of the permissions?

ice5nake’s picture

@Grayside, My need was for a role to be able to assign a node to any audience but not have the "administer nodes" permission.

I never really thought of this as being a narrow permission because this is primarily how we tie a node to a group.

Grayside’s picture

Status: Needs review » Needs work

It is. I've had a use case (and an issue in the queue somewhere) about a global group administer role, which in a sense is broader than this, but doesn't actually cover this functionality. I wanted to make sure this wasn't an isolated component of a broader notion to be addressed.

I am generally in favor of facilitating easier administration without needing to pull out the mega-perms.

This patch needs improved comments to point out that filter out any groups where author is not a member. we cannot rely on fapi to do this when in simple mode. is no longer the entire description of how things work. Should update for proper English grammar & capitalization as you go.

This feature will need to be paired with a test. I realize it's a simple change, but it's also a straightforward test. One user to edit the node and only see audiences of his group, empowered user to edit the node and see an extra group he's not part of.

ice5nake’s picture

@Grayside

The global group administrator isn't really germane to what I need so I see that as a separate feature and shouldn't be lumped in with this.

The comment you mention, while in the patch is not part of what is being patched, so I don't see that as germane either.

Are you talking about a test in some formal sense? Like a test framework? To help with that I'd need to be point in a direction if that's the case. Otherwise in a generic sense I have performed that test.

I am using this patch in production FWIW.

Grayside’s picture

The comment I mention describes the rules by which a user can set the audience. It needs to be updated to clarify that the administer audience permission does not require the user to be a member of the groups.

I mean tests as in http://drupal.org/documentation/modules/simpletest. There are existing tests in Organic Groups.