mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-17 01:31:25 +01:00
fixes to showAdd and filtering on load for non-admins
This commit is contained in:
parent
af43cd407e
commit
30587d625a
@ -41,7 +41,7 @@ export class CiphersComponent extends BaseCiphersComponent {
|
|||||||
|
|
||||||
async load(filter: (cipher: CipherView) => boolean = null) {
|
async load(filter: (cipher: CipherView) => boolean = null) {
|
||||||
if (!this.organization.isAdmin) {
|
if (!this.organization.isAdmin) {
|
||||||
await super.load();
|
await super.load(filter);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.accessEvents = this.organization.useEvents;
|
this.accessEvents = this.organization.useEvents;
|
||||||
|
@ -124,7 +124,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async clearGroupingFilters() {
|
async clearGroupingFilters() {
|
||||||
this.ciphersComponent.showAddNew = true;
|
this.ciphersComponent.showAddNew = this.showAdd;
|
||||||
this.groupingsComponent.searchPlaceholder = this.i18nService.t('searchVault');
|
this.groupingsComponent.searchPlaceholder = this.i18nService.t('searchVault');
|
||||||
await this.ciphersComponent.applyFilter();
|
await this.ciphersComponent.applyFilter();
|
||||||
this.clearFilters();
|
this.clearFilters();
|
||||||
@ -132,7 +132,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async filterCipherType(type: CipherType, load = false) {
|
async filterCipherType(type: CipherType, load = false) {
|
||||||
this.ciphersComponent.showAddNew = true;
|
this.ciphersComponent.showAddNew = this.showAdd;
|
||||||
this.groupingsComponent.searchPlaceholder = this.i18nService.t('searchType');
|
this.groupingsComponent.searchPlaceholder = this.i18nService.t('searchType');
|
||||||
const filter = (c: CipherView) => c.type === type;
|
const filter = (c: CipherView) => c.type === type;
|
||||||
if (load) {
|
if (load) {
|
||||||
|
Loading…
Reference in New Issue
Block a user