1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-06 19:53:59 +00:00

PM-7853 implemented hide send based on config setting

This commit is contained in:
Ben McFerren
2025-12-11 19:19:17 -05:00
parent 9f1496b218
commit df77b075c9
2 changed files with 10 additions and 1 deletions

View File

@@ -3,7 +3,9 @@
<bit-nav-logo [openIcon]="logo" route="." [label]="'passwordManager' | i18n"></bit-nav-logo>
<bit-nav-item icon="bwi-vault" [text]="'vaults' | i18n" route="vault"></bit-nav-item>
<bit-nav-item icon="bwi-send" [text]="'send' | i18n" route="sends"></bit-nav-item>
@if (!(disableSendPolicy$ | async)) {
<bit-nav-item icon="bwi-send" [text]="'send' | i18n" route="sends"></bit-nav-item>
}
<bit-nav-group icon="bwi-wrench" [text]="'tools' | i18n" route="tools">
<bit-nav-item [text]="'generator' | i18n" route="tools/generator"></bit-nav-item>
<bit-nav-item [text]="'importData' | i18n" route="tools/import"></bit-nav-item>

View File

@@ -42,6 +42,7 @@ export class UserLayoutComponent implements OnInit {
protected hasFamilySponsorshipAvailable$: Observable<boolean>;
protected showSponsoredFamilies$: Observable<boolean>;
protected showSubscription$: Observable<boolean>;
protected disableSendPolicy$: Observable<boolean>;
protected consolidatedSessionTimeoutComponent$: Observable<boolean>;
constructor(
@@ -84,5 +85,11 @@ export class UserLayoutComponent implements OnInit {
async ngOnInit() {
document.body.classList.remove("layout_frontend");
await this.syncService.fullSync(false);
this.disableSendPolicy$ = this.accountService.activeAccount$.pipe(
getUserId,
switchMap((userId) =>
this.policyService.policyAppliesToUser$(PolicyType.DisableSend, userId),
),
);
}
}