diff --git a/src/app/vault/vaultController.js b/src/app/vault/vaultController.js index 47146f80b5..98350aa7ff 100644 --- a/src/app/vault/vaultController.js +++ b/src/app/vault/vaultController.js @@ -309,8 +309,9 @@ } }); - modal.result.then(function (orgId) { - cipher.organizationId = orgId; + modal.result.then(function (returned) { + cipher.organizationId = returned.orgId; + cipher.collectionIds = returned.collectionIds || []; }); }; diff --git a/src/app/vault/vaultShareCipherController.js b/src/app/vault/vaultShareCipherController.js index cb7e405750..bb959e0eb0 100644 --- a/src/app/vault/vaultShareCipherController.js +++ b/src/app/vault/vaultShareCipherController.js @@ -141,6 +141,7 @@ } } + var returnedCollectionIds = null; $scope.submitPromise = $q.all(attachmentSharePromises).then(function () { if (errorOnUpload) { return; @@ -159,11 +160,15 @@ } } + returnedCollectionIds = request.collectionIds; return apiService.ciphers.putShare({ id: cipherId }, request).$promise; }).then(function (response) { $analytics.eventTrack('Shared Cipher'); toastr.success('Item has been shared.'); - $uibModalInstance.close(model.organizationId); + $uibModalInstance.close({ + orgId: model.organizationId, + collectionIds: returnedCollectionIds + }); }); }; diff --git a/src/app/vault/views/vault.html b/src/app/vault/views/vault.html index eb76be889a..49b8e90a13 100644 --- a/src/app/vault/views/vault.html +++ b/src/app/vault/views/vault.html @@ -73,7 +73,8 @@

No items to list.

-