Ensure master realm can't be removed
Fixes #28896 Signed-off-by: vramik <vramik@redhat.com>
This commit is contained in:
parent
6fbe207d64
commit
fbdaf03972
1 changed files with 1 additions and 1 deletions
|
@ -486,7 +486,7 @@ public class RealmAdminResource {
|
||||||
auth.realm().requireManageRealm();
|
auth.realm().requireManageRealm();
|
||||||
|
|
||||||
if (Config.getAdminRealm().equals(realm.getName())) {
|
if (Config.getAdminRealm().equals(realm.getName())) {
|
||||||
throw ErrorResponse.error("Can't rename master realm", Status.BAD_REQUEST);
|
throw ErrorResponse.error("Can't remove master realm", Status.BAD_REQUEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!new RealmManager(session).removeRealm(realm)) {
|
if (!new RealmManager(session).removeRealm(realm)) {
|
||||||
|
|
Loading…
Reference in a new issue