Home Forums Event Espresso Premium How to make capabilities, and add multiple capabilities to ticket

How to make capabilities, and add multiple capabilities to ticket

Posted: June 30, 2020 at 2:33 pm


June 30, 2020 at 2:33 pm

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?

Possibly something similar to this:


  • Support Staff

July 1, 2020 at 5:38 am

Hi there,

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.

An example of doing this can be found here:

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.

You must be logged in to reply to this support post. Sign In or Register for an Account

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: publish

Updated by  Tony 1 week, 1 day ago ago

Topic Tags


This topic is: not resolved
Do NOT follow this link or you will be banned from the site!