From 66f1b5e25ab5e8fc4f4facb04d98665ac7da9237 Mon Sep 17 00:00:00 2001 From: Larry Gregory Date: Tue, 11 Dec 2018 07:35:31 -0500 Subject: [PATCH] Only show change password form when a password change is possible (#26779) * only show change password form when a password change is possible * cleanup * remove test code * improved message --- x-pack/plugins/security/common/constants.js | 1 + x-pack/plugins/security/public/views/account/account.html | 7 +++++++ x-pack/plugins/security/public/views/account/account.js | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/x-pack/plugins/security/common/constants.js b/x-pack/plugins/security/common/constants.js index a62085787cd47..bc74ebb4bfeec 100644 --- a/x-pack/plugins/security/common/constants.js +++ b/x-pack/plugins/security/common/constants.js @@ -6,3 +6,4 @@ export const GLOBAL_RESOURCE = '*'; export const IGNORED_TYPES = ['space']; +export const REALMS_ELIGIBLE_FOR_PASSWORD_CHANGE = ['reserved', 'native']; \ No newline at end of file diff --git a/x-pack/plugins/security/public/views/account/account.html b/x-pack/plugins/security/public/views/account/account.html index 5df3ded202600..f56921a3d50f8 100644 --- a/x-pack/plugins/security/public/views/account/account.html +++ b/x-pack/plugins/security/public/views/account/account.html @@ -52,7 +52,14 @@ +
+ +
+

+
+
{ $scope.user.newPassword = newPassword; if (currentPassword) {