1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-19 09:43:23 +00:00

Disable Private Vault Export Policy (#2064)

This commit is contained in:
Oscar Hinton
2021-09-15 21:06:13 +02:00
committed by GitHub
parent bc908df348
commit 205b1153de
5 changed files with 20 additions and 8 deletions

View File

@@ -10,15 +10,19 @@
<span class="title">{{'exportVault' | i18n}}</span>
</div>
<div class="right">
<button appBlurClick type="submit">{{'submit' | i18n}}</button>
<button appBlurClick type="submit" [disabled]="disabledByPolicy">{{'submit' | i18n}}</button>
</div>
</header>
<content>
<app-callout type="warning" title="{{'vaultExportDisabled' | i18n}}" *ngIf="disabledByPolicy">
{{'personalVaultExportPolicyInEffect' | i18n}}
</app-callout>
<div class="box">
<div class="box-content">
<div class="box-content-row" appBoxRow>
<label for="format">{{'fileFormat' | i18n}}</label>
<select id="format" name="Format" [(ngModel)]="format">
<select id="format" name="Format" [(ngModel)]="format" [disabled]="disabledByPolicy">
<option value="json">.json</option>
<option value="csv">.csv</option>
<option value="encrypted_json">.json (Encrypted)</option>
@@ -28,7 +32,8 @@
<div class="row-main">
<label for="masterPassword">{{'masterPass' | i18n}}</label>
<input id="masterPassword" type="{{showPassword ? 'text' : 'password'}}" name="MasterPassword"
class="monospaced" [(ngModel)]="masterPassword" required appInputVerbatim appAutofocus>
class="monospaced" [(ngModel)]="masterPassword" required appInputVerbatim appAutofocus
[disabled]="disabledByPolicy">
</div>
<div class="action-buttons">
<a class="row-btn" href="#" appStopClick appBlurClick

View File

@@ -6,6 +6,7 @@ import { EventService } from 'jslib-common/abstractions/event.service';
import { ExportService } from 'jslib-common/abstractions/export.service';
import { I18nService } from 'jslib-common/abstractions/i18n.service';
import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.service';
import { PolicyService } from 'jslib-common/abstractions/policy.service';
import { ExportComponent as BaseExportComponent } from 'jslib-angular/components/export.component';
@@ -16,8 +17,8 @@ import { ExportComponent as BaseExportComponent } from 'jslib-angular/components
export class ExportComponent extends BaseExportComponent {
constructor(cryptoService: CryptoService, i18nService: I18nService,
platformUtilsService: PlatformUtilsService, exportService: ExportService,
eventService: EventService, private router: Router) {
super(cryptoService, i18nService, platformUtilsService, exportService, eventService, window);
eventService: EventService, policyService: PolicyService, private router: Router) {
super(cryptoService, i18nService, platformUtilsService, exportService, eventService, policyService, window);
}
protected saved() {