From 8d1908ba3b2d050189934b466e65ebc2308cd53a Mon Sep 17 00:00:00 2001 From: Thomas Rittson Date: Tue, 23 Mar 2021 14:33:36 +1000 Subject: [PATCH] Enforce new Send policy, fix naming conventions --- .../manage/policy-edit.component.html | 4 ++-- .../organizations/manage/policy-edit.component.ts | 14 +++++++------- src/app/send/add-edit.component.html | 7 +++++-- src/locales/en/messages.json | 3 +++ 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/app/organizations/manage/policy-edit.component.html b/src/app/organizations/manage/policy-edit.component.html index 1184ce6f..da022ec1 100644 --- a/src/app/organizations/manage/policy-edit.component.html +++ b/src/app/organizations/manage/policy-edit.component.html @@ -151,8 +151,8 @@
- + diff --git a/src/app/organizations/manage/policy-edit.component.ts b/src/app/organizations/manage/policy-edit.component.ts index 1824611d..92de72cb 100644 --- a/src/app/organizations/manage/policy-edit.component.ts +++ b/src/app/organizations/manage/policy-edit.component.ts @@ -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: diff --git a/src/app/send/add-edit.component.html b/src/app/send/add-edit.component.html index d8c91f49..64b0177b 100644 --- a/src/app/send/add-edit.component.html +++ b/src/app/send/add-edit.component.html @@ -209,8 +209,11 @@
- - + +
diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 46d3e5ba..7927e1fb 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -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." },