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:
parent
93e88d8b23
commit
f31360ecbf
@ -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 () {
|
||||
|
@ -32,8 +32,6 @@
|
||||
}
|
||||
$scope.selectedGroups = selectedGroups;
|
||||
$scope.loading = false;
|
||||
}, function (error) {
|
||||
|
||||
});
|
||||
|
||||
$scope.toggleGroupSelectionAll = function ($event) {
|
||||
|
@ -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', {}, {
|
||||
|
Loading…
Reference in New Issue
Block a user