diff --git a/services/src/main/java/org/keycloak/services/resources/account/AccountConsole.java b/services/src/main/java/org/keycloak/services/resources/account/AccountConsole.java index 85cf2a7947..e073848c55 100644 --- a/services/src/main/java/org/keycloak/services/resources/account/AccountConsole.java +++ b/services/src/main/java/org/keycloak/services/resources/account/AccountConsole.java @@ -89,6 +89,8 @@ public class AccountConsole { map.put("authUrl", session.getContext().getContextPath()); map.put("baseUrl", session.getContext().getContextPath() + "/realms/" + realm.getName() + "/account"); map.put("realm", realm.getName()); + map.put("isRegistrationEmailAsUsername", realm.isRegistrationEmailAsUsername()); + map.put("isEditUserNameAllowed", realm.isEditUsernameAllowed()); map.put("resourceUrl", Urls.themeRoot(baseUri).getPath() + "/account/" + theme.getName()); map.put("resourceVersion", Version.RESOURCES_VERSION); diff --git a/themes/src/main/resources/theme/keycloak-preview/account/index.ftl b/themes/src/main/resources/theme/keycloak-preview/account/index.ftl index 4183d14825..bbf4fd510f 100644 --- a/themes/src/main/resources/theme/keycloak-preview/account/index.ftl +++ b/themes/src/main/resources/theme/keycloak-preview/account/index.ftl @@ -8,6 +8,8 @@ var baseUrl = '${baseUrl}'; var realm = '${realm}'; var resourceUrl = '${resourceUrl}'; + var isRegistrationEmailAsUsername = ${isRegistrationEmailAsUsername?c}; + var isEditUserNameAllowed = ${isEditUserNameAllowed?c}; <#if referrer??> var referrer = '${referrer}'; diff --git a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/account-page/account-page.component.html b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/account-page/account-page.component.html index 7d2ffb1353..94a356e884 100644 --- a/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/account-page/account-page.component.html +++ b/themes/src/main/resources/theme/keycloak-preview/account/resources/app/content/account-page/account-page.component.html @@ -15,13 +15,14 @@