Support

Home Forums Ticketing Add-on Ticketing app permission check

Ticketing app permission check

Posted: October 2, 2013 at 8:19 am

Viewing 4 reply threads


Cristi Constantin

October 2, 2013 at 8:19 am

I have read in several topics that there is no user permission restrictions when someone is using the (Android) ticketing app. Do you have any news about it (current solution, futures plans, costs, workarounds)? I was interested in defining regional managers which could scan only their events.
Thanks.


Cristi Constantin

October 3, 2013 at 3:20 am

Seems to be solved according to your recent change log: https://eventespresso.com/wiki/change-log/#API-2.0.3


Cristi Constantin

October 3, 2013 at 3:30 am

Actually, I guess it isn’t fixed, due to the fact that the Android application uses Espresso Services API and not JSON API. What next?


Cristi Constantin

October 7, 2013 at 2:28 am

Any opinion on the subject? Thank you.


Josh

  • Support Staff

October 11, 2013 at 1:17 pm

Hi Cristi,

While it will not separate out events per user account, you can add a check in the older API’s events.php file starting right after line 51 like this:

//Get the role for this user
$caps = get_user_meta($userid, 'wp_capabilities', true);
$roles = array_keys((array)$caps);
//Set this to whatever role is needed to scan tickets
if ($roles[0] == 'administrator'){ //checks for admin level
	//Continue
}else{
	die("<?xml version='1.0'?><events><error>4</error><desc>Invalid User Role</desc></events>");
}
Viewing 4 reply threads

The support post ‘Ticketing app permission check’ 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.

Event Espresso