Skip Navigation

[Resolved] Need to assign 2 roles to users and limit access

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to use two different roles to limit Access to some posts. If role A is assigned, User can see posts type A. If role B is assigned, User can see posts type B. However if I assign both roles, Access does not allow Users to see both types A and B.

Solution: Access is only designed to support one role per User. In this example, you could use 3 roles to achieve the same effect. Assign only one of the 3 roles to each User:
Role 1: Can Access Type A
Role 2: Can Access Type B
Role 3: Can Access both A and B

This support ticket is created 6 years, 10 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#609545

Tell us what you are trying to do? Have an industry-specific site with licensed customers and associate customers for multiple brands. Some users are licensed for 2 brands, some are licensed for 1.

I've created access roles for each type. But when I assign a user to 2 roles, they can see one access type for one role, but can't see it for the other.

Is there any documentation that you are following? No

Is there a similar example that we can see? No

What is the link to your site? hidden link

#609556

Hi, Access is designed to support a single role per User. If more than one role is assigned to any single User using another User Role management plugin, Access conditional logic will not work correctly. In your example, however, you could use 3 Custom Roles created in Access to achieve the same result:
Role 1 - User can access Brand 1 post group
Role 2 - User can access Brand 2 post group
Role 3 - User can access both Brand 1 and Brand 2 post groups

Let me know if this will not work for your needs and we can discuss other ideas.

#613826

Thanks for the help. That's what I ended up doing.