Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
U
uw_cfg_common
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
WCMS
uw_cfg_common
Commits
70c88eee
Commit
70c88eee
authored
3 years ago
by
Eric Bremner
Committed by
Kevin Paxman
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ISTWCMS-4954: updating roles class to get all labels and all role ids
parent
bfe7300a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!133
Feature/istwcms 4954 ebremner features
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/UwRoles/UwRoles.php
+24
-0
24 additions, 0 deletions
src/UwRoles/UwRoles.php
with
24 additions
and
0 deletions
src/UwRoles/UwRoles.php
+
24
−
0
View file @
70c88eee
...
...
@@ -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
''
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment