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

View File

@ -32,8 +32,6 @@
} }
$scope.selectedGroups = selectedGroups; $scope.selectedGroups = selectedGroups;
$scope.loading = false; $scope.loading = false;
}, function (error) {
}); });
$scope.toggleGroupSelectionAll = function ($event) { $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' } }, listUsers: { url: _apiUri + '/organizations/:orgId/groups/:id/users', method: 'GET', params: { id: '@id', orgId: '@orgId' } },
post: { method: 'POST', params: { orgId: '@orgId' } }, post: { method: 'POST', params: { orgId: '@orgId' } },
put: { method: 'POST', params: { id: '@id', 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', {}, { _service.accounts = $resource(_apiUri + '/accounts', {}, {