diff --git a/src/app/services/apiService.js b/src/app/services/apiService.js index e793a86b6b..7abd50c106 100644 --- a/src/app/services/apiService.js +++ b/src/app/services/apiService.js @@ -100,7 +100,7 @@ _service.collections = $resource(_apiUri + '/organizations/:orgId/collections/:id', {}, { get: { method: 'GET', params: { id: '@id', orgId: '@orgId' } }, getDetails: { url: _apiUri + '/organizations/:orgId/collections/:id/details', method: 'GET', params: { id: '@id', orgId: '@orgId' } }, - listMe: { url: _apiUri + '/collections', method: 'GET', params: {} }, + listMe: { url: _apiUri + '/collections?writeOnly=:writeOnly', method: 'GET', params: { writeOnly: '@writeOnly' } }, listOrganization: { method: 'GET', params: { orgId: '@orgId' } }, listUsers: { url: _apiUri + '/organizations/:orgId/collections/:id/users', method: 'GET', params: { id: '@id', orgId: '@orgId' } }, post: { method: 'POST', params: { orgId: '@orgId' } }, diff --git a/src/app/vault/vaultLoginCollectionsController.js b/src/app/vault/vaultLoginCollectionsController.js index f8788814af..810f2d861b 100644 --- a/src/app/vault/vaultLoginCollectionsController.js +++ b/src/app/vault/vaultLoginCollectionsController.js @@ -39,7 +39,7 @@ return; } - apiService.collections.listMe(function (response) { + apiService.collections.listMe({ writeOnly: true }, function (response) { var collections = []; for (var i = 0; i < response.Data.length; i++) { if (response.Data[i].OrganizationId !== cipher.OrganizationId || response.Data[i].ReadOnly) { diff --git a/src/app/vault/vaultShareLoginController.js b/src/app/vault/vaultShareLoginController.js index 8ff5d9b759..e902c41131 100644 --- a/src/app/vault/vaultShareLoginController.js +++ b/src/app/vault/vaultShareLoginController.js @@ -51,7 +51,7 @@ $scope.organizations = orgs; - apiService.collections.listMe(function (response) { + apiService.collections.listMe({ writeOnly: true }, function (response) { var collections = []; for (var i = 0; i < response.Data.length; i++) { if (response.Data[i].ReadOnly) { diff --git a/src/app/vault/vaultSharedController.js b/src/app/vault/vaultSharedController.js index 4e7a762ee4..336a6c8cf1 100644 --- a/src/app/vault/vaultSharedController.js +++ b/src/app/vault/vaultSharedController.js @@ -8,7 +8,7 @@ $scope.loading = true; $scope.$on('$viewContentLoaded', function () { - var collectionPromise = apiService.collections.listMe({}, function (collections) { + var collectionPromise = apiService.collections.listMe({ writeOnly: false }, function (collections) { var decCollections = []; for (var i = 0; i < collections.Data.length; i++) {