It looks like users are being assigned the group join role when they request a subscription, but before the subscription is approved in groups that require sub approval.
I experimented by using a test user, joining a moderated group, and as soon as the test user requested a subscription the previously hidden group content appeared. If I disable the OG_User_Roles the same user who is awaiting subscription can no longer see the group content that is not public. I think you might just be missing a flag check in there somewhere.
The only access control modules I'm using are Drupal core, OG, OG_User_Roles, and Nodeaccess
Comments
Comment #1
somebodysysop commentedNot sure how to address this issue. Looked into it and right now og_user_roles assigns the user the role in hook_og at "user insert". Where else should this occur?
Comment #2
Steel Rat commentedBeats me. Does user insert occur when a sub is requested? Or when approved?
Comment #3
somebodysysop commentedI *thought* it was when it is approved. The only options for hook_og are:
'user insert', 'user update', 'user delete'
Comment #4
Steel Rat commentedBummer. Is there any way to check if a user's subscription is pending or approved, and act or not act upon that?
Comment #5
somebodysysop commentedIn the og_uid table, there is a column "is_active". Apparently, this is "0" if the user is in moderation, or "1" if the user's membership has been approved.
The thing which tripped me up is that there is no way for an admin to actually place a user in moderation. The user is automatically placed in this category if he subscribes to a moderated group.
Anyway, try the attached patch against a clean version of the 2.5 release. See if it does the trick.
Comment #6
Steel Rat commentedI haven't had much luck running patches, I'll try to edit manually.
Comment #7
Steel Rat commentedLooks like that fixed it!
Thanks again for making the module which made my Role-playing site possible, and for the best support of any module so far!
Steel Rat
Comment #8
somebodysysop commentedYou're welcome!
Comment #9
somebodysysop commentedCommited changes to release OGR release 2.6.
Comment #10
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.