mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-01 23:01:28 +01:00
pull only writable collections when editing
This commit is contained in:
parent
f019dc6575
commit
63033ca12d
@ -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' } },
|
||||
|
@ -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) {
|
||||
|
@ -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) {
|
||||
|
@ -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++) {
|
||||
|
Loading…
Reference in New Issue
Block a user