undo manage rules for org groupings listing
This commit is contained in:
parent
647388e475
commit
af43cd407e
|
@ -30,16 +30,12 @@ export class GroupingsComponent extends BaseGroupingsComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
async loadCollections() {
|
async loadCollections() {
|
||||||
if (!this.organization.isManager) {
|
if (!this.organization.isAdmin) {
|
||||||
await super.loadCollections(this.organization.id);
|
await super.loadCollections(this.organization.id);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let collections: ListResponse<CollectionResponse>;
|
|
||||||
if (this.organization.isAdmin) {
|
const collections = await this.apiService.getCollections(this.organization.id);
|
||||||
collections = await this.apiService.getCollections(this.organization.id);
|
|
||||||
} else {
|
|
||||||
collections = await this.apiService.getUserCollections();
|
|
||||||
}
|
|
||||||
if (collections != null && collections.data != null && collections.data.length) {
|
if (collections != null && collections.data != null && collections.data.length) {
|
||||||
const collectionDomains = collections.data.map((r) =>
|
const collectionDomains = collections.data.map((r) =>
|
||||||
new Collection(new CollectionData(r as CollectionDetailsResponse)));
|
new Collection(new CollectionData(r as CollectionDetailsResponse)));
|
||||||
|
@ -48,7 +44,6 @@ export class GroupingsComponent extends BaseGroupingsComponent {
|
||||||
this.collections = [];
|
this.collections = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.organization.isAdmin) {
|
|
||||||
const unassignedCollection = new CollectionView();
|
const unassignedCollection = new CollectionView();
|
||||||
unassignedCollection.name = this.i18nService.t('unassigned');
|
unassignedCollection.name = this.i18nService.t('unassigned');
|
||||||
unassignedCollection.id = 'unassigned';
|
unassignedCollection.id = 'unassigned';
|
||||||
|
@ -56,5 +51,4 @@ export class GroupingsComponent extends BaseGroupingsComponent {
|
||||||
unassignedCollection.readOnly = true;
|
unassignedCollection.readOnly = true;
|
||||||
this.collections.push(unassignedCollection);
|
this.collections.push(unassignedCollection);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue