Skip to content
Snippets Groups Projects
Commit 70c88eee authored by Eric Bremner's avatar Eric Bremner Committed by Kevin Paxman
Browse files

ISTWCMS-4954: updating roles class to get all labels and all role ids

parent bfe7300a
No related branches found
No related tags found
1 merge request!133Feature/istwcms 4954 ebremner features
......@@ -60,6 +60,24 @@ class UwRoles {
];
}
/**
* Gets all the role ids in the system, UW and Drupal.
*
* @return array
* Array of all role ids.
*/
public static function getAllRoles(): array {
// Get the UW roles.
$roles = UwRoles::getUwRoleIds();
// Append the Drupal roles.
$roles = array_merge($roles, UwRoles::getDrupalRoleIds());
// Return all the roles.
return $roles;
}
/**
* Gets the label for a UW role.
*
......@@ -90,6 +108,12 @@ class UwRoles {
case 'uw_role_form_results_access':
return 'Form results access';
case 'anonymous':
return 'Anonymous';
case 'authenticated':
return 'Authenticated';
default:
return '';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment