1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

fixed to collection sharing. observe login edit.

This commit is contained in:
Kyle Spearrin
2017-05-08 11:36:11 -04:00
parent 565c6bafae
commit 4518e7056c
9 changed files with 30 additions and 12 deletions

View File

@@ -12,7 +12,7 @@
$scope.collections = [];
$uibModalInstance.opened.then(function () {
apiService.ciphers.getFullDetails({ id: loginId }).$promise.then(function (cipher) {
apiService.ciphers.getDetails({ id: loginId }).$promise.then(function (cipher) {
$scope.loadingLogin = false;
$scope.readOnly = !cipher.Edit;
@@ -42,7 +42,10 @@
apiService.collections.listMe(function (response) {
var collections = [];
for (var i = 0; i < response.Data.length; i++) {
if (response.Data[i].OrganizationId !== cipher.OrganizationId) {
if (response.Data[i].OrganizationId !== cipher.OrganizationId || response.Data[i].ReadOnly) {
if (response.Data[i].Id in $scope.selectedCollections) {
delete $scope.selectedCollections[response.Data[i].Id];
}
continue;
}