mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-28 12:45:45 +01:00
Disable Private Vault Export Policy (#1068)
This commit is contained in:
parent
e8da01bafb
commit
da4af743f3
2
jslib
2
jslib
@ -1 +1 @@
|
||||
Subproject commit a85c45a34ed90b09f59ec27bdba754d66452915e
|
||||
Subproject commit ee1ea922a9d5a51ef8df2abf4b97fc035ed782be
|
@ -2,6 +2,9 @@
|
||||
<div class="modal-dialog" role="document">
|
||||
<form class="modal-content" #form (ngSubmit)="submit()">
|
||||
<div class="modal-body">
|
||||
<app-callout type="warning" title="{{'vaultExportDisabled' | i18n}}" *ngIf="disabledByPolicy">
|
||||
{{'personalVaultExportPolicyInEffect' | i18n}}
|
||||
</app-callout>
|
||||
<div class="box">
|
||||
<div class="box-header" id="exportTitle">
|
||||
{{'exportVault' | i18n}}
|
||||
@ -9,7 +12,7 @@
|
||||
<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>
|
||||
@ -20,7 +23,7 @@
|
||||
<label for="masterPassword">{{'masterPass' | i18n}}</label>
|
||||
<input id="masterPassword" type="{{showPassword ? 'text' : 'password'}}"
|
||||
name="MasterPassword" class="monospaced" [(ngModel)]="masterPassword" required
|
||||
appAutofocus>
|
||||
appAutofocus [disabled]="disabledByPolicy">
|
||||
</div>
|
||||
<div class="action-buttons">
|
||||
<a class="row-btn" href="#" appStopClick appBlurClick role="button"
|
||||
@ -37,7 +40,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button appBlurClick type="submit" class="primary" appA11yTitle="{{'submit' | i18n}}">
|
||||
<button appBlurClick type="submit" class="primary" appA11yTitle="{{'submit' | i18n}}"
|
||||
[disabled]="disabledByPolicy">
|
||||
<i class="fa fa-download fa-lg fa-fw" aria-hidden="true"></i>
|
||||
</button>
|
||||
<button type="button" data-dismiss="modal">{{'cancel' | i18n}}</button>
|
||||
|
@ -1,7 +1,6 @@
|
||||
import {
|
||||
Component,
|
||||
NgZone,
|
||||
OnDestroy,
|
||||
OnInit,
|
||||
} from '@angular/core';
|
||||
|
||||
@ -16,6 +15,7 @@ import { PlatformUtilsService } from 'jslib-common/abstractions/platformUtils.se
|
||||
import { BroadcasterService } from 'jslib-angular/services/broadcaster.service';
|
||||
|
||||
import { ExportComponent as BaseExportComponent } from 'jslib-angular/components/export.component';
|
||||
import { PolicyService } from 'jslib-common/abstractions/policy.service';
|
||||
|
||||
const BroadcasterSubscriptionId = 'ExportComponent';
|
||||
|
||||
@ -26,12 +26,13 @@ const BroadcasterSubscriptionId = 'ExportComponent';
|
||||
export class ExportComponent extends BaseExportComponent implements OnInit {
|
||||
constructor(cryptoService: CryptoService, i18nService: I18nService,
|
||||
platformUtilsService: PlatformUtilsService, exportService: ExportService,
|
||||
eventService: EventService, private broadcasterService: BroadcasterService,
|
||||
private ngZone: NgZone) {
|
||||
super(cryptoService, i18nService, platformUtilsService, exportService, eventService, window);
|
||||
eventService: EventService, policyService: PolicyService,
|
||||
private broadcasterService: BroadcasterService, private ngZone: NgZone) {
|
||||
super(cryptoService, i18nService, platformUtilsService, exportService, eventService, policyService, window);
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
super.ngOnInit();
|
||||
this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => {
|
||||
this.ngZone.run(() => {
|
||||
switch (message.command) {
|
||||
|
@ -1708,5 +1708,11 @@
|
||||
},
|
||||
"resetPasswordAutoEnrollInviteWarning": {
|
||||
"message": "This organization has an enterprise policy that will automatically enroll you in password reset. Enrollment will allow organization administrators to change your master password."
|
||||
},
|
||||
"vaultExportDisabled": {
|
||||
"message": "Vault Export Disabled"
|
||||
},
|
||||
"personalVaultExportPolicyInEffect": {
|
||||
"message": "One or more organization policies prevents you from exporting your personal vault."
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user