1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-27 17:29:39 +02:00

fix(userSettings): allow to change admin password when using LDAP auth (#1227)

This commit is contained in:
Anthony Lapenna 2017-09-22 08:00:13 +02:00 committed by GitHub
parent 6bf7c90634
commit 7b924bde83
2 changed files with 4 additions and 4 deletions

View file

@ -9,11 +9,10 @@ function ($scope, $state, $sanitize, Authentication, UserService, Notifications,
$scope.updatePassword = function() {
$scope.invalidPassword = false;
var userID = Authentication.getUserDetails().ID;
var currentPassword = $sanitize($scope.formValues.currentPassword);
var newPassword = $sanitize($scope.formValues.newPassword);
UserService.updateUserPassword(userID, currentPassword, newPassword)
UserService.updateUserPassword($scope.userID, currentPassword, newPassword)
.then(function success() {
Notifications.success('Success', 'Password successfully updated');
$state.reload();
@ -28,6 +27,7 @@ function ($scope, $state, $sanitize, Authentication, UserService, Notifications,
};
function initView() {
$scope.userID = Authentication.getUserDetails().ID;
SettingsService.publicSettings()
.then(function success(data) {
$scope.AuthenticationMethod = data.AuthenticationMethod;