org admin delete cipher

This commit is contained in:
Kyle Spearrin 2017-04-19 10:06:59 -04:00
parent 0b9083915a
commit eab5c0db12
2 changed files with 15 additions and 1 deletions

View File

@ -116,4 +116,17 @@
login.subvaultIds = request.subvaultIds; login.subvaultIds = request.subvaultIds;
}); });
}; };
$scope.deleteLogin = function (login) {
if (!confirm('Are you sure you want to delete this login (' + login.name + ')?')) {
return;
}
apiService.ciphers.delAdmin({ id: login.id }, function () {
var index = $scope.logins.indexOf(login);
if (index > -1) {
$scope.logins.splice(index, 1);
}
});
};
}); });

View File

@ -33,7 +33,8 @@
putShare: { url: _apiUri + '/ciphers/:id/share', method: 'POST', params: { id: '@id' } }, putShare: { url: _apiUri + '/ciphers/:id/share', method: 'POST', params: { id: '@id' } },
putSubvaults: { url: _apiUri + '/ciphers/:id/subvaults', method: 'POST', params: { id: '@id' } }, putSubvaults: { url: _apiUri + '/ciphers/:id/subvaults', method: 'POST', params: { id: '@id' } },
putSubvaultsAdmin: { url: _apiUri + '/ciphers/:id/subvaults-admin', method: 'POST', params: { id: '@id' } }, putSubvaultsAdmin: { url: _apiUri + '/ciphers/:id/subvaults-admin', method: 'POST', params: { id: '@id' } },
del: { url: _apiUri + '/ciphers/:id/delete', method: 'POST', params: { id: '@id' } } del: { url: _apiUri + '/ciphers/:id/delete', method: 'POST', params: { id: '@id' } },
delAdmin: { url: _apiUri + '/ciphers/:id/delete-admin', method: 'POST', params: { id: '@id' } }
}); });
_service.organizations = $resource(_apiUri + '/organizations/:id', {}, { _service.organizations = $resource(_apiUri + '/organizations/:id', {}, {