mirror of
https://github.com/bitwarden/web
synced 2025-12-26 13:13:24 +00:00
Enforce new Send policy, fix naming conventions
This commit is contained in:
@@ -151,8 +151,8 @@
|
||||
<div class="form-group">
|
||||
<label>{{'disabledSendType' | i18n}}</label>
|
||||
<div class="form-check" *ngFor="let o of disableSendPolicyOptions">
|
||||
<input class="form-check-input" type="radio" [(ngModel)]="disabledSends" name="Type_{{o.value}}"
|
||||
id="type_{{o.value}}" [value]="o.value" [checked]="disabledSends === o.value">
|
||||
<input class="form-check-input" type="radio" [(ngModel)]="disableSend" name="Type_{{o.value}}"
|
||||
id="type_{{o.value}}" [value]="o.value" [checked]="disableSend === o.value">
|
||||
<label class="form-check-label" for="type_{{o.value}}">
|
||||
{{o.name}}
|
||||
</label>
|
||||
|
||||
@@ -13,7 +13,7 @@ import { ApiService } from 'jslib/abstractions/api.service';
|
||||
import { I18nService } from 'jslib/abstractions/i18n.service';
|
||||
|
||||
import { PolicyType } from 'jslib/enums/policyType';
|
||||
import { DisableSendPolicyType } from 'jslib/enums/disableSendPolicyType';
|
||||
import { DisableSendType } from 'jslib/enums/disableSendType';
|
||||
|
||||
import { PolicyRequest } from 'jslib/models/request/policyRequest';
|
||||
|
||||
@@ -64,7 +64,7 @@ export class PolicyEditComponent implements OnInit {
|
||||
|
||||
// Disable Send
|
||||
|
||||
disabledSends: DisableSendPolicyType = DisableSendPolicyType.DisableAll;
|
||||
disableSend = DisableSendType.DisableAll;
|
||||
|
||||
private policy: PolicyResponse;
|
||||
|
||||
@@ -84,8 +84,8 @@ export class PolicyEditComponent implements OnInit {
|
||||
{ name: i18nService.t('passphrase'), value: 'passphrase' },
|
||||
];
|
||||
this.disableSendPolicyOptions = [
|
||||
{ name: i18nService.t('disableAllSends'), value: DisableSendPolicyType.DisableAll },
|
||||
{ name: i18nService.t('disableAnonymousSends'), value: DisableSendPolicyType.DisableAnonymous }
|
||||
{ name: i18nService.t('disableAllSends'), value: DisableSendType.DisableAll },
|
||||
{ name: i18nService.t('disableAnonymousSends'), value: DisableSendType.DisableAnonymous }
|
||||
]
|
||||
}
|
||||
|
||||
@@ -124,8 +124,8 @@ export class PolicyEditComponent implements OnInit {
|
||||
this.masterPassRequireSpecial = this.policy.data.requireSpecial;
|
||||
break;
|
||||
case PolicyType.DisableSend:
|
||||
this.disabledSends = this.policy.data.disabledSends ||
|
||||
DisableSendPolicyType.DisableAll;
|
||||
this.disableSend = this.policy.data.disableSend ||
|
||||
DisableSendType.DisableAll;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -175,7 +175,7 @@ export class PolicyEditComponent implements OnInit {
|
||||
break;
|
||||
case PolicyType.DisableSend:
|
||||
request.data = {
|
||||
disableSendPolicy: this.disabledSends,
|
||||
disableSend: this.disableSend,
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -209,8 +209,11 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="form-check">
|
||||
<input class="form-check-input" type="checkbox" [(ngModel)]="send.hideEmail" id="hideEmail" name="HideEmail">
|
||||
<label class="form-check-label" for="hideEmail">{{'hideEmail' | i18n}}</label>
|
||||
<input class="form-check-input" type="checkbox" [(ngModel)]="send.hideEmail" id="hideEmail"
|
||||
name="HideEmail" [disabled]="disableAnonymousSend || disableSend">
|
||||
<label class="form-check-label" for="hideEmail">
|
||||
{{'hideEmail' | i18n}}<span *ngIf="disableAnonymousSend" class="font-italic"> {{'anonymousSendDisabled' | i18n}}</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -3787,6 +3787,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"anonymousSendDisabled": {
|
||||
"message": "(This option has been disabled by an Enterprise Policy.)"
|
||||
},
|
||||
"anonymousSendWarning": {
|
||||
"message": "The Bitwarden user who created this Send has chosen to hide their email address. You should not trust this Send or download any file unless you trust the user who created it."
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user