Returns whether a user has a certain permission on a single resource.
public static hasPermission ( mixed $in, string $filter, string | integer $permission, string $user = null ) : boolean | ||
$in | mixed | A single resource to check. |
$filter | string | The kind of resource specified in $in, currently only 'queue'. |
$permission | string | integer | A permission, either 'assign' or 'update', 'requester', or one of the PERM_* constants. |
$user | string | A user name. |
return | boolean | True if the user has the specified permission. |