Hi, I've sent this question to several forums but haven't had a response, so I'll create as a bug. Please correct as needed.

The issue is:
OG User Roles can't seem to allow certain users to submit content only for specific groups (not system wide).

For example, I need to configure a user to be able to blog only to a specific group. Based on what I read, seems like OG User roles is designed to do what I'm trying to accomplish, but couldn't get it to behave as expected. not sure if its a bug or if I'm doing something wrong, but I'll file it anyway.

Here's the use-case:

1. I created a group: "GroupX".
2. I created a role "Blogger" with the blog module's "edit own blog" permission checked.
3. In the Content Type admin section, I set the Blog content type's Organic groups usage to "Standard group post".
4. In the OG User Roles admin section, I made Blogger an assignable role for GroupX
5. As group admin , I added a "UserX" to "GroupX".
6. In the GroupX member list, under "Configure member roles", I assigned the Blogger role to UserX.
7. When I log in as userX, I still don't see "Create Blog entry" from the Group Details block. Shouldn't userX be allowed to only post blogs only to GroupX after checking the group's Blogger role for that user in "Configure Member Roles"?

The only time i get to see the "Create Blog entry" in Group Details is when I grant the system wide Blogger role to the user, but this will allow the user to submit blogs everywhere, which is is not intended.

Why doesn't the Configure Member Roles functionality seem to work? Please confirm if this is a bug or if there are additional steps needed.

Comments

somebodysysop’s picture

See project page: http://drupal.org/project/og_user_roles

If your basic "OG Roles aren't working", please note the following:
It appears that the Drupal caching mechanism is used much more stringently as a result of either 5.7 core or OG 5.x-7.x changes. Assuming OGR has been installed correctly, this may result in group roles you've assigned to group users not being respected when they should (i.e., when they are in group context). In this case, the solution is to implement the "Clear the Cache" setting in OGR: http://drupal.org/node/263944.

tborrome’s picture

I have caching disabled already. This is not the cause of the issue I' seeing, the problem mentioned there is differnt.

In my case (using Page Content as an example this time), I dont want to grant system-wide Create Page Content permissions to the user, otherwise the user will be able to post pages site-wide. I only want the user to create pages on a specific group. So I'm enabling a role with Create Page Content permission to the user through the group's Configure Member Roles. But this does not give the user with ability for "Create Page" (it does not show up as an option in Group menu).

Please verify if og_user_roles is meant to do this.

tborrome’s picture

What I meant is I already have "Clear the user_access() and cache_menu caches for user? " checked.

tborrome’s picture

And even vice-versa - if I grant a role with Create Page permission to the user system-wide and if I have it unchecked on the Group's Configure member roles sections, it will still alow me to post pages to that group.

Cant seem to get this to work both ways. Please clarify if I'm using og_user_roles incorrectly or if this is a bug I'm seeing.

I have "Clear the user_access() and cache_menu caches for user? " already checked.

thanks!

somebodysysop’s picture

In my case (using Page Content as an example this time), I dont want to grant system-wide Create Page Content permissions to the user, otherwise the user will be able to post pages site-wide. I only want the user to create pages on a specific group. So I'm enabling a role with Create Page Content permission to the user through the group's Configure Member Roles. But this does not give the user with ability for "Create Page" (it does not show up as an option in Group menu).

Please verify if og_user_roles is meant to do this.

Yes it is.

What I meant is I already have "Clear the user_access() and cache_menu caches for user? " checked.
...
I have caching disabled already. This is not the cause of the issue I' seeing, the problem mentioned there is differnt.

Again, I recommend you read http://drupal.org/node/263944 carefully as there is also the small issue of a user module patch that must be installed. http://drupal.org/node/177948

Please advise if the patch is installed.

tborrome’s picture

thank you very much
installing the patch fixed the issue
i now see the create page option after granting the corresponding group member role.

I noticed though that when a user posts new content, the Audience section of the Submit Content page will show check boxes for all gruops the user is part of. but it will only allow the user to post to groups with member roles configured for the user. is there a way to filter the Audience check boxes in to only groups where the user is allowed to submit content to? or is this an enhancement request ?

Thanks again for the help!

somebodysysop’s picture

Status: Active » Fixed

We've been around and around on that issue. See: http://drupal.org/node/187097

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.