Add permissions UI
This commit is contained in:
@@ -181,6 +181,7 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
active: false,
|
||||
source: '',
|
||||
selectedGroups: [],
|
||||
role: '',
|
||||
|
||||
show: function (userInfo) {
|
||||
$scope.useredit.error = {};
|
||||
@@ -192,6 +193,8 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
$scope.useredit.admin = userInfo.admin;
|
||||
$scope.useredit.active = userInfo.active;
|
||||
$scope.useredit.source = userInfo.source;
|
||||
// TODO once we have more roles, we have to change this
|
||||
$scope.useredit.role = userInfo.permissions ? userInfo.permissions[0] : '';
|
||||
|
||||
$scope.useredit_form.$setPristine();
|
||||
$scope.useredit_form.$setUntouched();
|
||||
@@ -207,7 +210,8 @@ angular.module('Application').controller('UsersController', ['$scope', '$locatio
|
||||
var data = {
|
||||
id: userId,
|
||||
admin: $scope.useredit.admin,
|
||||
active: $scope.useredit.active
|
||||
active: $scope.useredit.active,
|
||||
permissions: $scope.useredit.role ? [ $scope.useredit.role ] : null
|
||||
};
|
||||
|
||||
// only change those if it is a local user
|
||||
|
||||
Reference in New Issue
Block a user