Don't allow support to set ranks for admin+ or content users

This commit is contained in:
Spencer 2018-01-06 16:47:21 -05:00 committed by Alexander Meech
parent 14daa939e3
commit 5c6a9ea879
1 changed files with 6 additions and 0 deletions

View File

@ -101,6 +101,12 @@ public class SupportRankListPage extends SupportPage
private void handleGroupSet(PermissionGroup group)
{
if (_target.inheritsFrom(PermissionGroup.ADMIN) || _target.inheritsFrom(PermissionGroup.CONTENT))
{
message("You can't set this user's rank!");
return;
}
getPlugin().getClientManager().setPrimaryGroup(_target.getAccountId(), group, () -> {
message("You have applied the rank " + group.getDisplay(true, true, true, true).toUpperCase() + C.mBody + " to " + C.cYellow + _target.getName());
_target.setPrimaryGroup(group);