From af43cd407e8f9028d0437b0e578c2c7a4602d27e Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Wed, 17 Oct 2018 15:57:39 -0400 Subject: [PATCH] undo manage rules for org groupings listing --- .../vault/groupings.component.ts | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/app/organizations/vault/groupings.component.ts b/src/app/organizations/vault/groupings.component.ts index 92c7ca5655..3be2e453f6 100644 --- a/src/app/organizations/vault/groupings.component.ts +++ b/src/app/organizations/vault/groupings.component.ts @@ -30,16 +30,12 @@ export class GroupingsComponent extends BaseGroupingsComponent { } async loadCollections() { - if (!this.organization.isManager) { + if (!this.organization.isAdmin) { await super.loadCollections(this.organization.id); return; } - let collections: ListResponse; - if (this.organization.isAdmin) { - collections = await this.apiService.getCollections(this.organization.id); - } else { - collections = await this.apiService.getUserCollections(); - } + + const collections = await this.apiService.getCollections(this.organization.id); if (collections != null && collections.data != null && collections.data.length) { const collectionDomains = collections.data.map((r) => new Collection(new CollectionData(r as CollectionDetailsResponse))); @@ -48,13 +44,11 @@ export class GroupingsComponent extends BaseGroupingsComponent { this.collections = []; } - if (this.organization.isAdmin) { - const unassignedCollection = new CollectionView(); - unassignedCollection.name = this.i18nService.t('unassigned'); - unassignedCollection.id = 'unassigned'; - unassignedCollection.organizationId = this.organization.id; - unassignedCollection.readOnly = true; - this.collections.push(unassignedCollection); - } + const unassignedCollection = new CollectionView(); + unassignedCollection.name = this.i18nService.t('unassigned'); + unassignedCollection.id = 'unassigned'; + unassignedCollection.organizationId = this.organization.id; + unassignedCollection.readOnly = true; + this.collections.push(unassignedCollection); } }