1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-10-30 08:10:34 +01:00

remove user from group

This commit is contained in:
Kyle Spearrin 2017-05-09 19:23:49 -04:00
parent 93e88d8b23
commit f31360ecbf
3 changed files with 13 additions and 13 deletions

View File

@ -38,16 +38,17 @@
return;
}
//apiService.collectionUsers.del({ orgId: $state.params.orgId, id: user.id }, null, function () {
// toastr.success(user.email + ' has been removed.', 'User Removed');
// $analytics.eventTrack('Removed User From Collection');
// var index = $scope.users.indexOf(user);
// if (index > -1) {
// $scope.users.splice(index, 1);
// }
//}, function () {
// toastr.error('Unable to remove user.', 'Error');
//});
apiService.groups.delUser({ orgId: $state.params.orgId, id: group.id, orgUserId: user.organizationUserId }, null,
function () {
toastr.success(user.email + ' has been removed.', 'User Removed');
$analytics.eventTrack('Removed User From Group');
var index = $scope.users.indexOf(user);
if (index > -1) {
$scope.users.splice(index, 1);
}
}, function () {
toastr.error('Unable to remove user.', 'Error');
});
};
$scope.close = function () {

View File

@ -32,8 +32,6 @@
}
$scope.selectedGroups = selectedGroups;
$scope.loading = false;
}, function (error) {
});
$scope.toggleGroupSelectionAll = function ($event) {

View File

@ -91,7 +91,8 @@
listUsers: { url: _apiUri + '/organizations/:orgId/groups/:id/users', method: 'GET', params: { id: '@id', orgId: '@orgId' } },
post: { method: 'POST', params: { orgId: '@orgId' } },
put: { method: 'POST', params: { id: '@id', orgId: '@orgId' } },
del: { url: _apiUri + '/organizations/:orgId/groups/:id/delete', method: 'POST', params: { id: '@id', orgId: '@orgId' } }
del: { url: _apiUri + '/organizations/:orgId/groups/:id/delete', method: 'POST', params: { id: '@id', orgId: '@orgId' } },
delUser: { url: _apiUri + '/organizations/:orgId/groups/:id/delete-user/:orgUserId', method: 'POST', params: { id: '@id', orgId: '@orgId', orgUserId: '@orgUserId' } }
});
_service.accounts = $resource(_apiUri + '/accounts', {}, {