modX::hasPermission
Returns true if user has the specified policy permission.
Syntax
API Doc: http://api.modxcms.com/modx/modX.html#hasPermission
boolean hasPermission (string $pm)
Example
Deny the user access if they don't have the permission 'edit_chunk' in their loaded Policies.
if (!$modx->hasPermission('edit_chunk')) die('Access Denied!');