mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-24 12:06:15 +01:00
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';
|
||||||
@ -57,4 +52,3 @@ export class GroupingsComponent extends BaseGroupingsComponent {
|
|||||||
this.collections.push(unassignedCollection);
|
this.collections.push(unassignedCollection);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user