1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 02:33:46 +00:00

only show selected collection that are writeable

This commit is contained in:
Kyle Spearrin
2017-08-30 17:09:22 -04:00
parent 63033ca12d
commit 465304b004
2 changed files with 17 additions and 15 deletions

View File

@@ -54,10 +54,6 @@
apiService.collections.listMe({ writeOnly: true }, function (response) {
var collections = [];
for (var i = 0; i < response.Data.length; i++) {
if (response.Data[i].ReadOnly) {
continue;
}
var decCollection = cipherService.decryptCollection(response.Data[i]);
decCollection.organizationId = response.Data[i].OrganizationId;
collections.push(decCollection);
@@ -74,8 +70,7 @@
var collections = {};
if ($event.target.checked) {
for (var i = 0; i < $scope.collections.length; i++) {
if ($scope.model.organizationId && $scope.collections[i].organizationId === $scope.model.organizationId &&
!$scope.collections[i].readOnly) {
if ($scope.model.organizationId && $scope.collections[i].organizationId === $scope.model.organizationId) {
collections[$scope.collections[i].id] = true;
}
}