Navigation

Search

allowedTo

Description

Checks to see if the user has the specified permission.

Syntax

bool allowedTo (mixed $permissions[, mixed $boards])



Parameter $permissions

Expected type: Mixed
Description: Either a single permission or an array of several permissions

Allowed types for $permissions
Allowed values Description
String A specific permission
Array An array of several permissions (ie array('profile_edit_any', 'profile_edit_own'))



Parameter $boards

Expected type: Mixed
Description: One or more board IDs

Allowed types for $boards
Allowed values Description
Integer The ID of a single board to check permissions on
Array The IDs of two or more boards to check permissions on



Return value

Expected type: Boolean
Description: True if they have the permission (or if they have at least one of the permissions in the array); false if they don't


Notes

  • The boards parameter can be used to check permissions on specific boards (ie local permissions)
  • If boards is specified, returns true only if the user has that permission (or at least one of those permissions) on all of the boards
View all versions of this function