mirror of
https://github.com/bitwarden/browser
synced 2026-01-04 17:43:39 +00:00
org keys and optimized org profile load for sidenav
This commit is contained in:
@@ -7,7 +7,13 @@
|
||||
|
||||
$scope.confirm = function (user) {
|
||||
apiService.users.getPublicKey({ id: user.userId }, function (userKey) {
|
||||
var key = cryptoService.rsaEncrypt('org key', userKey.PublicKey);
|
||||
var orgKey = cryptoService.getOrgKey($state.params.orgId);
|
||||
if (!orgKey) {
|
||||
toastr.error('Unable to confirm user.', 'Error');
|
||||
return;
|
||||
}
|
||||
|
||||
var key = cryptoService.rsaEncrypt(orgKey, userKey.PublicKey);
|
||||
apiService.organizationUsers.confirm({ orgId: $state.params.orgId, id: user.id }, { key: key }, function () {
|
||||
user.status = 2;
|
||||
toastr.success(user.email + ' has been confirmed.', 'User Confirmed');
|
||||
|
||||
Reference in New Issue
Block a user