Skip to content

Commit

Permalink
Allow superadmin accounts to delete other superadmin accounts #281
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemhall committed Mar 21, 2023
1 parent 05bda5a commit e899b7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Libki/Controller/Administration/API/User.pm
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ sub delete : Local : Args(1) {
if ( $user->username eq $c->user->username ) {
$msg = q{CANNOT_DELETE_YOURSELF};
}
elsif ( $i_am_admin && $user_is_superadmin ) {
elsif ( $user_is_superadmin && !$i_am_superadmin ) {
$msg = q{ADMIN_CANNOT_DELETE_SUPERADMIN};
}
elsif ( $i_am_superadmin || ( $i_am_admin && !$user_is_superadmin ) ) {
Expand Down

0 comments on commit e899b7f

Please sign in to comment.