Do not send active or role attributes for own user while edit
This commit is contained in:
@@ -214,11 +214,15 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
|
||||
var userId = $scope.useredit.userInfo.id;
|
||||
var data = {
|
||||
id: userId,
|
||||
active: $scope.useredit.active,
|
||||
role: $scope.useredit.role
|
||||
id: userId
|
||||
};
|
||||
|
||||
// only send if not the current active user
|
||||
if (userId !== $scope.userInfo.id) {
|
||||
data.active = $scope.useredit.active;
|
||||
data.role = $scope.useredit.role;
|
||||
}
|
||||
|
||||
// only change those if it is a local user
|
||||
if (!$scope.useredit.source) {
|
||||
data.email = $scope.useredit.email;
|
||||
|
||||
Reference in New Issue
Block a user