Notifications
Clear all

[Solved] Confused about permissions

16 Posts
3 Users
3 Reactions
592 Views
Posts: 44
Topic starter
(@mustafamohsen)
Trusted Member
Joined: 2 years ago

I use a membership plugin to assign roles to members, which sync with the user groups

The roles section shows 30 members for a particular role

https://cln.sh/Wy4456bm

While the synced user group shows only 9. The others are denied access to the designated forum

https://cln.sh/GYVXPfKh

What am I missing here?

15 Replies
Robert
Posts: 10549
Admin
(@robert)
Support Team
Joined: 8 years ago

@mustafamohsen,

It's difficult to help you with only cropped screenshots. The best way to debug the issue is to login as an admin and review the user data for those without permissions. The users you're mentioning might have multiple roles, preventing synchronization with user groups. Alternatively, the user data is conflicting with the membership plugin. In any case this is a time consuming and deep investigating job which could only be done in scope of pro support. You can request it if you'll not be able to fix the issue: https://wpforo.com/pro-support/#plugin-support

Posts: 44
Topic starter
(@mustafamohsen)
Trusted Member
Joined: 2 years ago

@robert

Thank you for your response. Before considering professional support (which I'm ok with if needed), I would like to try resolving my issue here. My situation is that my setup relies heavily on roles for different functionalities. I would like to know if having multiple roles per user will prevent role syncing.

To clarify, if a user has roleA, roleB, and roleC, which should sync with groupA, groupB, and groupC respectively, will this setup not work?

If it does not work, how can I automate the process of adding users to groups (in order to grant access to restricted forums) without using roles?

4 Replies
Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10549

@mustafamohsen

Posted by: @mustafamohsen

My situation is that my setup relies heavily on roles for different functionalities. I would like to know if having multiple roles per user will prevent role syncing.

Yes, this could be the reason. The multiple roles can stop synching usergroups because usergroups are different, there is a primary group and secondary group, but there is no difference in user roles so the system cannot understand how to synchronize them.

You can only update usergroups manually. If there would be an automatic way it would work even with multiple roles.

(@mustafamohsen)
Joined: 2 years ago

Trusted Member
Posts: 44

@robert 
Thank you for your on going support

Now I'm more confused. I can't find documentation on how the roles/permissions/... work

I don't understand the difference between primary and secondary groups

And more importantly, I don't know now what to do. So your guidance is appreciated.

If by updating usergroups manually you mean to sync manually, then i've done that repeatedly. Yet, nothing changed

Otherwise, if you mean to add and remove users manually, then I need some kind of a workaround, as this is a heavy maintenance and very error prone in my use case.

Bottom line: I need to give access to users to one or multiple forums based on their membership status. The only interface between the membership plugin (SureMembers) and WPForo is WordPress roles. So how do I achieve that? Alternatively, If WPForo has direct API's then I'm ok with exploring this solution, or whatever

Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10549

@mustafamohsen,

Just edit a user in Dashboard > Users admin page, edit a user and see the primary and secondary usergroups. The primary usergroup is only one, but users can have multiple secondary usergroups. 

Resource:

(@mustafamohsen)
Joined: 2 years ago

Trusted Member
Posts: 44

@robert 
Perfect! Yes, this seems elaborate. I'll check it and I'll reach out again if anything's still stuck

Many thanks

Posts: 44
Topic starter
(@mustafamohsen)
Trusted Member
Joined: 2 years ago

@robert

Ok, thank you for all your great support. Now I think that I understand how it works, and my confusion is clarified. But I still couldn't figure out how to automate my setup.

Here's an example use case:

User johndoe buys the two memberships: Marketing bundle, Sales Bundle

Each automatically assigns WordPress roles (as bellow), which synch with each's usergroups; aiming at automatically giving access to the designated forum like this

marketing-user (role) -> MarketingUserGroup (secondary usergroup) -> Marketing Forum

sales-user (role) -> SalesUserGroup (secondary usergroup) -> Sales Forum

By assigning the second role (sales-user here), it gets synched correctly with its usergroup, but it cancels the member from all other usergroups (MarketingUserGroup). Is this how it should work? And what's my solution here?

8 Replies
Robert
Admin
(@robert)
Joined: 8 years ago

Support Team
Posts: 10549

@mustafamohsen,

It's really hard to understand what's going on in your WordPress. Again, if users have more than one user role then we cannot support such synchronisation. 

I think it's not a good idea to try synchronize usergroups with roles using secondary user groups. It'll work fine if you only use primary usergroups and don't use secondary usergroups. We cannot do a deep debugging of multiple roles with usergroups, it's a time consuming and hard taks.

(@mustafamohsen)
Joined: 2 years ago

Trusted Member
Posts: 44

@robert 
First, thank you for going this far with your support and explanation. I really appreciate that.

Ok, I understand what you said. So let me ask you the bottom line question: Is there ANY way to automate assigning secondary usergroups to users, thus grant them access to restricted forums automatically? That's my ultimate purpose: To automate adding and removing users to/from the forums. Whichever's the possible way to do it, I'm ok with

Thanks

Moderator
(@martin)
Joined: 8 years ago

Support Team
Posts: 988

Hi @mustafamohsen,

I think the only way is using User Custom Fields addon and put the Secondary Usergroup field in the Registration for letting users to select the group they want to attend. So, once they registered they'll get their selected secondary usergroup.

As a paid solution you can request for creating an addon for your membership plugin integration. Please let me know what membership solution you use we may already have a custom code for that plugin? 

(@mustafamohsen)
Joined: 2 years ago

Trusted Member
Posts: 44

@martin 

Thanks for that. In my use case, forum access is not for them to choose or not. Rather, it's a privilege based on their membership (or course purchase, etc.)

Based on your advice, I contacted gVectors for the possibility of a paid solution. But I'm also interested in suggesting opening up any sort of API access, which can solve so many problems without being strictly limited to available integrations. What do you think?

Thanks

Moderator
(@martin)
Joined: 8 years ago

Support Team
Posts: 988

@mustafamohsen,

That depends on the membership plugin you use. So let me know how are you handling your memberships. 

(@mustafamohsen)
Joined: 2 years ago

Trusted Member
Posts: 44
Moderator
(@martin)
Joined: 8 years ago

Support Team
Posts: 988

@mustafamohsen,

Thank you for the plugin name. We'll check it and let you know. As far as i noticed our team has received request from you. They'll contact you seen.

(@mustafamohsen)
Joined: 2 years ago

Trusted Member
Posts: 44

@martin Well appreciated