Repository navigation
UI should prevent admins from defining a dynamic client scope with type Default - #48973
Conversation
|
@edewit Could you please check it? Thanks! |
There was a problem hiding this comment.
Thanks @mabartos! In general I see this OK. But probably with these changes we need to change the client scope to non-dynamic on an update in the admin console when the feature is disabled. If not there can be errors for sure when updating (because the None is allowed in the console but disallowed in the endpoint).
Maybe we can add something like this in the ScopeForm.tsx:
useEffect(() => {
if (!isDynamicScopesEnabled && dynamicScope === "true") {
setValue(
convertAttributeNameToForm<ClientScopeDefaultOptionalType>(
"attributes.is.dynamic.scope",
),
"false",
);
}
}, [setValue, dynamicScope, isDynamicScopesEnabled]);The idea would be that, if you update a previously dynamic scope, is transformed to non-dynamic in the admin console. At endpoint is OK to return the error.
WDYT?
…pe Default Closes keycloak#22229 Signed-off-by: Martin Bartoš <mabartos@redhat.com>
|
@rmartinc Works to me. However, it's quite fragile to just change the dynamic scope to the normal one without notice. Maybe the intention was to use it only as the dynamic scope? In order to be sure, I just added a small warning, with the information. Demo:
Screencast.From.2026-05-14.12-11-14.mp4@rmartinc WDYT? Would be nice if @edewit could review it, but if not, I think it's not a big deal as there should not be any risk. |
Signed-off-by: Martin Bartoš <mabartos@redhat.com>
Signed-off-by: Martin Bartoš <mabartos@redhat.com>
…pe Default (keycloak#48973) * UI should prevent admins from defining a dynamic client scope with type Default Closes keycloak#22229 Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Add Alert, and change to non-dynamic scope Signed-off-by: Martin Bartoš <mabartos@redhat.com> * Unify the dynamic label usage Signed-off-by: Martin Bartoš <mabartos@redhat.com> --------- Signed-off-by: Martin Bartoš <mabartos@redhat.com>
Uh oh!
There was an error while loading. Please reload this page.