Roles

When working with project memberships, you will be required to state which role(s) users are groups are to be granted, when assigned to a proejct. Unfortunately, Redmine's API does not permit creating these roles; you can only read the existing roles via the API!. See Redmine's API documentationopen in new window for details.

Fetch roles list

WHen you fetch the list of roles, you are only provided with an id and a name for the role. It will NOT contain all details about a given role.

use Aedart\Redmine\Role;

$roles = Role::list(); 

Note: The roles API resource does not support pagination!

Fetch single role

If you require additional details about a role, e.g. what permissions it grants, then you must obtain the role by it's id.

$role = Role::findOrFail(6);

$permissions = $role->permissions;