From c834e7473c02f11451216b3fbf355f953cfd95e9 Mon Sep 17 00:00:00 2001 From: Alexis Rico Date: Mon, 7 Jul 2025 18:38:47 +0200 Subject: [PATCH] Fix typo in consent scope) * Deprecate `displayTest` Closes #40786 Signed-off-by: Alexis Rico Signed-off-by: Alexander Schwartz Co-authored-by: Alexander Schwartz --- .../account/ConsentScopeRepresentation.java | 28 +++++++++++++++---- .../topics/changes/changes-26_4_0.adoc | 13 ++++++--- js/apps/account-ui/src/api/representations.ts | 2 +- 3 files changed, 32 insertions(+), 11 deletions(-) diff --git a/core/src/main/java/org/keycloak/representations/account/ConsentScopeRepresentation.java b/core/src/main/java/org/keycloak/representations/account/ConsentScopeRepresentation.java index a4b6400a164..31eb0eb60b9 100644 --- a/core/src/main/java/org/keycloak/representations/account/ConsentScopeRepresentation.java +++ b/core/src/main/java/org/keycloak/representations/account/ConsentScopeRepresentation.java @@ -23,15 +23,15 @@ public class ConsentScopeRepresentation { private String name; - private String displayTest; + private String displayText; public ConsentScopeRepresentation() { } - public ConsentScopeRepresentation(String id, String name, String displayTest) { + public ConsentScopeRepresentation(String id, String name, String displayText) { this.id = id; this.name = name; - this.displayTest = displayTest; + this.displayText = displayText; } public String getId() { @@ -50,11 +50,27 @@ public class ConsentScopeRepresentation { this.name = name; } - public String getDisplayTest() { - return displayTest; + public String getDisplayText() { + return displayText; } + public void setDisplayText(String displayText) { + this.displayText = displayText; + } + + /** + * @deprecated Use {@link #getDisplayText()} instead. This method will be removed in KC 27.0. + */ + @Deprecated + public String getDisplayTest() { + return displayText; + } + + /** + * @deprecated Use {@link #setDisplayText(String)} instead. This method will be removed in KC 27.0. + */ + @Deprecated public void setDisplayTest(String displayTest) { - this.displayTest = displayTest; + this.displayText = displayTest; } } diff --git a/docs/documentation/upgrading/topics/changes/changes-26_4_0.adoc b/docs/documentation/upgrading/topics/changes/changes-26_4_0.adoc index 35db36aaa4d..9c2b190b977 100644 --- a/docs/documentation/upgrading/topics/changes/changes-26_4_0.adoc +++ b/docs/documentation/upgrading/topics/changes/changes-26_4_0.adoc @@ -14,14 +14,15 @@ Notable changes where an internal behavior changed to prevent common misconfigur === Usage of the `exact` request parameter when searching users by attributes If you are querying users by attributes through the User API where you want to fetch users that match a specific attribute key (regardless the value), -you should consider setting the `exact` request parameter to `false` when invoking the `/admin/realms/{realm}/users` using +you should consider setting the `exact` request parameter to `false` when invoking the `+/admin/realms/{realm}/users+` using the `GET` method. For instance, searching for all users with the attribute `myattribute` set should be done as follows: -``` +[source] +---- GET /admin/realms/{realm}/users?exact=false&q=myattribute: -``` +---- The {project_name} Admin Client is also updated with a new method to search users by attribute using the `exact` request parameter. @@ -46,7 +47,11 @@ properties will still function as before, but we recommend to change to the CLI The following sections provide details on deprecated features. -=== +=== Deprecated `displayTest` field in `ConsentScopeRepresentation` + +The `displayTest` field in the `ConsentScopeRepresentation` class returned by the Account REST service has been deprecated due to a typo in its name. +A new field `displayText` with the correct spelling has been added to replace it. The old field will be removed in {project_name} 27.0. +The Typescript code `ConsentScopeRepresentation` for the Account Console already contains only the new field. // ------------------------ Removed features ------------------------ // == Removed features diff --git a/js/apps/account-ui/src/api/representations.ts b/js/apps/account-ui/src/api/representations.ts index 0c4bb10d31b..944c0dd49de 100644 --- a/js/apps/account-ui/src/api/representations.ts +++ b/js/apps/account-ui/src/api/representations.ts @@ -31,7 +31,7 @@ export interface ConsentRepresentation { export interface ConsentScopeRepresentation { id: string; name: string; - displayTest: string; + displayText: string; } export interface CredentialMetadataRepresentationMessage {