Trying to find a way to allow users with several capabilities to access with “and” or “or” when multiple roles or capabilities are listed in the ticket capability requirement.
Use Case:
Jim has a custom role of “01_jan” and a custom role of “bike_law”
I need for a ticket to only display for him. This is an “AND”
How should I interpret a role into a “capabilities” so I can effect these sorts of cases?
A role is simply a set of capabilities. It’s an easy way to group them together but it should not be used to define what you have access to.
For example, I can give you a user account on my site and set it to have the Administrator role, but I can then remove the capabilities on that account to match say a subscriber. Your account should (and if caps are used correctly will) only have access to exactly the same as what a user with a subscriber role would.
Multiple capabilities are not officially supported with the current EE ticket capability check but it is possible to hook in and add your own processing to this.
That function allows you to set multiple capabilities separated by a comma and then loops over them to check if the current user has any of those capabilites. So you’ll need to alter that function to check they have each of the caps you set and return a ‘true’ value if they do, otherwise return false as they don’t have access.
Viewing 1 reply thread
The support post ‘How to make capabilities, and add multiple capabilities to ticket’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.