mirror of
https://github.com/bitwarden/web
synced 2025-12-11 05:43:16 +00:00
set collections for org admin
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: c946f01b5f...3021afc9dd
@@ -48,6 +48,13 @@ export class AddEditComponent extends BaseAddEditComponent {
|
|||||||
await this.organizationChanged();
|
await this.organizationChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected loadCollections() {
|
||||||
|
if (!this.organization.isAdmin) {
|
||||||
|
return super.loadCollections();
|
||||||
|
}
|
||||||
|
return Promise.resolve(this.collections);
|
||||||
|
}
|
||||||
|
|
||||||
protected async loadCipher() {
|
protected async loadCipher() {
|
||||||
if (!this.organization.isAdmin) {
|
if (!this.organization.isAdmin) {
|
||||||
return await super.loadCipher();
|
return await super.loadCipher();
|
||||||
|
|||||||
@@ -238,6 +238,9 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
this.modal = this.cipherAddEditModalRef.createComponent(factory).instance;
|
this.modal = this.cipherAddEditModalRef.createComponent(factory).instance;
|
||||||
const childComponent = this.modal.show<AddEditComponent>(AddEditComponent, this.cipherAddEditModalRef);
|
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.organization = this.organization;
|
||||||
childComponent.cipherId = cipher == null ? null : cipher.id;
|
childComponent.cipherId = cipher == null ? null : cipher.id;
|
||||||
childComponent.onSavedCipher.subscribe(async (c: CipherView) => {
|
childComponent.onSavedCipher.subscribe(async (c: CipherView) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user