API.hasPermission(userID, role)

Returns a Boolean whether the userID passed has permission of the passed role. If you pass undefined or null for userID, it checks the permission of the logged in user. Pass an API.ROLE constant.

Comments

Powered by Zendesk