mirror of
https://github.com/portainer/portainer.git
synced 2025-08-08 07:15:23 +02:00
non-admins must supply existing passwd when changing passwd (#10249)
This commit is contained in:
parent
515b02813b
commit
e5f7641e46
5 changed files with 24 additions and 9 deletions
|
@ -54,8 +54,8 @@ export function UserService($q, Users, TeamService, TeamMembershipService) {
|
|||
return Users.remove({ id: id }).$promise;
|
||||
};
|
||||
|
||||
service.updateUser = function (id, { password, role, username }) {
|
||||
return Users.update({ id }, { password, role, username }).$promise;
|
||||
service.updateUser = function (id, { newPassword, role, username }) {
|
||||
return Users.update({ id }, { newPassword, role, username }).$promise;
|
||||
};
|
||||
|
||||
service.updateUserPassword = function (id, currentPassword, newPassword) {
|
||||
|
|
|
@ -72,7 +72,7 @@ angular.module('portainer.app').controller('UserController', [
|
|||
if (!confirmed) {
|
||||
return;
|
||||
}
|
||||
UserService.updateUser($scope.user.Id, { password: $scope.formValues.newPassword })
|
||||
UserService.updateUser($scope.user.Id, { newPassword: $scope.formValues.newPassword })
|
||||
.then(function success() {
|
||||
Notifications.success('Success', 'Password successfully updated');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue