mirror of
https://github.com/keycloak/keycloak.git
synced 2025-12-16 20:15:46 -06:00
fix: do not re-neable AuthorizationService if it is already enabled
The enable action needs the realm-wide "modify client" permission, which restricted admins with the fine-grained-authz feature do not have. This causes a "forbidden" exception when try try to save a client with Authorization already enabled, even if the "enable" action does nothing since it was already enabled. Fixes #22938 Signed-off-by: Vojtěch Boček <vbocek@gmail.com>
This commit is contained in:
committed by
Pedro Igor
parent
302fa3db08
commit
cd4543456e
@@ -64,7 +64,9 @@ public class AuthorizationService {
|
||||
}
|
||||
|
||||
public void enable(boolean newClient) {
|
||||
this.resourceServer = getResourceServerService().create(newClient);
|
||||
if (!isEnabled()) {
|
||||
this.resourceServer = getResourceServerService().create(newClient);
|
||||
}
|
||||
}
|
||||
|
||||
public void disable() {
|
||||
|
||||
Reference in New Issue
Block a user