From e6477b0b977119436b51f3a98cf5777df131f6ad Mon Sep 17 00:00:00 2001 From: Dmitry Salakhov Date: Tue, 19 Jul 2022 11:26:34 +1200 Subject: [PATCH] fix(users): admin can change password with any auth method (#7268) [EE-3671] --- app/portainer/views/account/account.html | 15 ++++----------- app/portainer/views/account/accountController.js | 1 + 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/app/portainer/views/account/account.html b/app/portainer/views/account/account.html index baf36a7de..07bb25899 100644 --- a/app/portainer/views/account/account.html +++ b/app/portainer/views/account/account.html @@ -39,14 +39,7 @@ @@ -64,7 +57,7 @@ - + You cannot change your password when using LDAP authentication. - + You cannot change your password when using OAuth authentication. diff --git a/app/portainer/views/account/accountController.js b/app/portainer/views/account/accountController.js index 58868893e..f56c4e212 100644 --- a/app/portainer/views/account/accountController.js +++ b/app/portainer/views/account/accountController.js @@ -118,6 +118,7 @@ angular.module('portainer.app').controller('AccountController', [ $scope.userID = userDetails.ID; $scope.userRole = Authentication.getUserDetails().role; $scope.forceChangePassword = userDetails.forceChangePassword; + $scope.isInitialAdmin = userDetails.ID === 1; if (state.application.demoEnvironment.enabled) { $scope.isDemoUser = state.application.demoEnvironment.users.includes($scope.userID);