Group Permissions Clarification Needed

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Suggested Hosts
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
tmslugger
Registered User
Posts: 3
Joined: Wed Jul 08, 2009 11:32 am

Group Permissions Clarification Needed

Post by tmslugger » Wed Jul 08, 2009 11:40 am

Hi, I am using phpbb3 3.0.5 on my subscription sites. I have created a user defined group called 'premium members' for paying members that has standard permissions to view both the premium and free forums. Guests do not have permissions to view the premium forums, but can 'read only' the free forums. Other non-paying registered users fall into the pre-defined 'registered users' group and have standard access to the free forums, but no access to the premium forums.

My question (and issue) comes into play when a user goes from registered, non-paying to a paid user. The membership software that I am using adds the user to the premium group once they pay. However, it does not make the user defined phpbb 'premium' group as the user's default group. They then do not have access to the premium forums. If I make the user's default group the premium group, then they do have access.

Can someone please explain how the permissions work if a user belongs to more than one group? If the user is in the guests, registered users, and premium group all at the same time, what group gets priority? I thought it might have had something to do with the higher group id, but that does not seem to be the case.

Any help would be appreciated.

Thanks!
Slugger

narqelion
I've Been Banned!
Posts: 7235
Joined: Sat Dec 13, 2008 5:00 pm
Contact:

Re: Group Permissions Clarification Needed

Post by narqelion » Wed Jul 08, 2009 4:14 pm

tmslugger wrote:Can someone please explain how the permissions work if a user belongs to more than one group?
If you retain membership in multiple groups you create the potential for permission conflicts. It's actually better practice when defining your group structure to minimize the # of group memberships that duplicate permissions. For example you say that in your board you created a "premium members" group that has permissions to view both the free and the premium forums and that the registered users group can view just the free forums. In this instance when you add the member to the premium group I would advise removing them from the registered users group and making the premium group their default. The only time I would ever advise a user to setup multiple group memberships is when the groups are setup with independent and non-overlapping permissions. As to your question regarding priority, the default group controls that in regard to certain functionality but not all, it gets a bit tricky with the Never permission being able to trump a Yes across groups. Hope that helps a bit. :)

p.s.
tmslugger wrote:If the user is in the guests..
Members should not be in the guests groups, the guests group is really only designed for the anonymous user which is anybody browsing your board that has not logged in yet.

paul_tanner
Registered User
Posts: 3
Joined: Thu Jul 16, 2009 11:08 am

Re: Group Permissions Clarification Needed

Post by paul_tanner » Thu Jul 16, 2009 11:32 am

I also have a private forum associated with a "members" group
I found that when I just added someone to that group was not enough. They would not see it when they logged in.

As I understand from the above, we should take them out of "registered users" and make "members" their default group.

I want to check as on a large group this is a lot of admin if there's another way.

BTW. I did find one other way that doesn't make sense to me: you can go to the private forum and from there give the members group full access. Strange because it already had?

Paul

paul_tanner
Registered User
Posts: 3
Joined: Thu Jul 16, 2009 11:08 am

Re: Group Permissions via database

Post by paul_tanner » Thu Jul 16, 2009 3:43 pm

Hi,

A user is in "Approved members" only
1. Via direct SQL to the database I put them in another group (INSERT INTO x_user_group ..)
2. The new group is not visible to them as them log in.
3. I make the new group default via the ACP.
4. Now the new group shows when they log in.

Now I try again with a different user but trying to do step 3 with direct SQL (UPDATE x_users SET ..
The new group does not show on login.
The ACP shows that the change *has* been made.
If I then undo and redo 3 via the ACP the group now shows.

So, the ACP is not just putting the user in a group. Something else happens to control the visibilty of the group on login. What do I need to do in the DB to affect that without manual intervention?

Thx. Paul

tmslugger
Registered User
Posts: 3
Joined: Wed Jul 08, 2009 11:32 am

Re: Group Permissions Clarification Needed

Post by tmslugger » Mon Jul 20, 2009 1:31 pm

In my situation (using a 3rd party membership software), I had to edit the code so that any time a subscription was added/changed, the user_permissions field in the phpbb_groups table was cleared out. This seems to corrected my issue. It was as if the permissions were still there for the old group.

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50422
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Group Permissions Clarification Needed

Post by stevemaury » Mon Jul 20, 2009 2:14 pm

paul_tanner, it is better to start your own topic than to hijack another's. Groups do not need to be the default for a memeber for the permissions of that group to be applied to the member.

And do not place members in groups directly in the database. This may be the source of your issues.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

paul_tanner
Registered User
Posts: 3
Joined: Thu Jul 16, 2009 11:08 am

Re: Group Permissions Clarification Needed

Post by paul_tanner » Mon Jul 20, 2009 4:35 pm

Sorry stevesmaury, I don't see why you think this is off-topic. In most forums starting another topic for essentially the same thing would be frowned upon. Nevertheless I'd be happy to move this elsewhere if I knew how.

The reason for inserting the group membership dierctly to the database is to keep down the administrative load. In this application (a membership system) the groups are necessarily defined elsewhere and we want to avoid the forum permissions getting out of step.

So I return to the questions of what controls which groups you see when you log in? How can we ensure (automatically) that people in the members group see the corresponding forums on login?

Thx tmslugger for your comment. This seems to be about permission changes being recognised but I will see if that is relevant.

Thx. Paul

User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 50422
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: Group Permissions Clarification Needed

Post by stevemaury » Mon Jul 20, 2009 4:44 pm

Please start your own topic. Thank you.
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)

Locked

Return to “[3.0.x] Support Forum”