From 7af2133924d63a5a932c53b6fa4b1a6c5b1eec81 Mon Sep 17 00:00:00 2001 From: Vlastimil Elias Date: Thu, 1 Jul 2021 13:56:24 +0200 Subject: [PATCH] KEYCLOAK-18542 - User Profile Admin UI - hide unused configurations for username and email attributes --- .../theme/base/admin/resources/js/controllers/realm.js | 4 ++++ .../base/admin/resources/partials/realm-user-profile.html | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js b/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js index e7c193bea4..e37d94e718 100644 --- a/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js +++ b/themes/src/main/resources/theme/base/admin/resources/js/controllers/realm.js @@ -1532,6 +1532,10 @@ module.controller('RealmUserProfileCtrl', function($scope, Realm, realm, clientS }; }; + $scope.isNotUsernameOrEmail = function(attributeName) { + return attributeName != "username" && attributeName != "email"; + }; + $scope.removeAttribute = function(attribute) { Dialog.confirmDelete(attribute.name, 'attribute', function() { let newAttributes = []; diff --git a/themes/src/main/resources/theme/base/admin/resources/partials/realm-user-profile.html b/themes/src/main/resources/theme/base/admin/resources/partials/realm-user-profile.html index 452a703f74..2d513279a7 100755 --- a/themes/src/main/resources/theme/base/admin/resources/partials/realm-user-profile.html +++ b/themes/src/main/resources/theme/base/admin/resources/partials/realm-user-profile.html @@ -85,14 +85,14 @@ type="text" class="form-control"/> -
+
{{:: 'user.profile.attribute.selector.scopes.tooltip' | translate}}
-
+
{{:: 'user.profile.attribute.required.tooltip' | translate}}
@@ -114,7 +114,7 @@
-
+
{{:: 'user.profile.attribute.permission' | translate}}