Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
administer_audience_permission_and_functionality.patch | 2.22 KB | ice5nake | |
Comments
Comment #1
ice5nake CreditAttribution: ice5nake commentedBefore creating this patch I posted this question, http://drupal.stackexchange.com/questions/6406/how-do-you-allow-a-user-t...
Comment #2
ice5nake CreditAttribution: ice5nake commentedIs there anything I can do to help get this patch reviewed and incorporated into Organic Groups?
Comment #3
cjamesrun CreditAttribution: cjamesrun commentedThis 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.
Comment #4
dddbbb CreditAttribution: dddbbb commentedI'd love to see this too (in D7).
Comment #5
ice5nake CreditAttribution: ice5nake commented@cjamesrun, did you try the patch I posted? It's pretty straight forward.
Comment #6
Grayside CreditAttribution: Grayside commentedThis 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?
Comment #7
ice5nake CreditAttribution: ice5nake commented@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.
Comment #8
Grayside CreditAttribution: Grayside commentedIt 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.
Comment #9
ice5nake CreditAttribution: ice5nake commented@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.
Comment #10
Grayside CreditAttribution: Grayside commentedThe 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.