mirror of
https://github.com/bitwarden/browser
synced 2024-12-26 18:04:07 +01:00
set collections for org admin
This commit is contained in:
parent
5e7c9a7278
commit
69f0339bd5
2
jslib
2
jslib
@ -1 +1 @@
|
||||
Subproject commit c946f01b5fbe5b84b928ae8dd4ad54a15dd1803d
|
||||
Subproject commit 3021afc9ddae1579f2226010ee487fa3edcddb0b
|
@ -48,6 +48,13 @@ export class AddEditComponent extends BaseAddEditComponent {
|
||||
await this.organizationChanged();
|
||||
}
|
||||
|
||||
protected loadCollections() {
|
||||
if (!this.organization.isAdmin) {
|
||||
return super.loadCollections();
|
||||
}
|
||||
return Promise.resolve(this.collections);
|
||||
}
|
||||
|
||||
protected async loadCipher() {
|
||||
if (!this.organization.isAdmin) {
|
||||
return await super.loadCipher();
|
||||
|
@ -238,6 +238,9 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
this.modal = this.cipherAddEditModalRef.createComponent(factory).instance;
|
||||
const childComponent = this.modal.show<AddEditComponent>(AddEditComponent, this.cipherAddEditModalRef);
|
||||
|
||||
if (this.organization.isAdmin) {
|
||||
childComponent.collections = this.groupingsComponent.collections.filter((c) => !c.readOnly);
|
||||
}
|
||||
childComponent.organization = this.organization;
|
||||
childComponent.cipherId = cipher == null ? null : cipher.id;
|
||||
childComponent.onSavedCipher.subscribe(async (c: CipherView) => {
|
||||
|
Loading…
Reference in New Issue
Block a user