1
0
mirror of https://github.com/sismics/docs.git synced 2025-12-21 13:41:37 +00:00

#18: Group resource, groups handling in ACL, groups returned in users

This commit is contained in:
jendib
2016-03-19 19:41:28 +01:00
parent 43a1575187
commit a5ce5bf9ec
27 changed files with 725 additions and 133 deletions

View File

@@ -74,7 +74,7 @@ angular.module('docs').controller('DocumentViewPermissions', function ($scope, $
.get({
search: $viewValue
}).then(function(data) {
deferred.resolve(_.pluck(data.users, 'username'), true);
deferred.resolve(_.pluck(data.users, 'name'), true);
});
return deferred.promise;
};

View File

@@ -8,7 +8,7 @@ angular.module('docs').controller('SettingsUser', function($scope, $state, Resta
* Load users from server.
*/
$scope.loadUsers = function() {
Restangular.one('user/list').get({ limit: 100 }).then(function(data) {
Restangular.one('user/list').get().then(function(data) {
$scope.users = data.users;
});
};

View File

@@ -22,10 +22,10 @@
<form name="aclForm" class="form-horizontal">
<div class="form-group">
<label class=" col-sm-2 control-label" for="inputTarget">User</label>
<label class=" col-sm-2 control-label" for="inputTarget">For</label>
<div class="col-sm-3">
<input required ng-maxlength="50" class="form-control" type="text" id="inputTarget"
placeholder="Type a username" name="username" ng-model="acl.username" autocomplete="off"
placeholder="Type a username" name="username" ng-model="acl.target" autocomplete="off"
typeahead="username for username in getTargetAclTypeahead($viewValue) | filter: $viewValue"
typeahead-wait-ms="200" />
</div>