Skip to content

Commit

Permalink
Create a local name for a permission level which is not defined in
Browse files Browse the repository at this point in the history
the active %userRoles hash. Will prevent Accounts Manager from failing.
See openwebwork#2625
but when editing a user with such a value, will only allow choosing
a defined level.
  • Loading branch information
taniwallach committed Nov 21, 2024
1 parent df4b848 commit 0c08039
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
id => $fieldName . '_id', class => 'form-select form-select-sm w-auto flex-grow-0',
'aria-labelledby' => 'permission_header' =%>
% } else {
<%= maketext((grep { $ce->{userRoles}{$_} eq $value } keys %{ $ce->{userRoles} })[0]) %>
<%= maketext((grep { $ce->{userRoles}{$_} eq $value } keys %{ $ce->{userRoles} })[0] // "PermLevel$value") %>
% }
% } elsif ($properties->{type} eq 'password') {
% # Note that this is only called if in editMode.
Expand Down

0 comments on commit 0c08039

Please sign in to comment.