mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 16:23:44 +00:00
Hide email address in Sends (#895)
* Let organizations disable anonymous sends only * Add hide email option to send * Display warning for anonymous Sends * Enforce new Send policy, fix naming conventions * Minor UI improvements * Fix linting * Fully disable editing anonymous Sends per policy * Revert "Let organizations disable anonymous sends only" This reverts commit 7877cb7751e6e765d45cf6ffbe5a684e60923b56. * Revert disableSendPolicy, add sendOptionsPolicy * Rework UI for enforcing DisableHideEmail * Fix typo * Minor UI tweaks * Minor UI tweaks * Tweaks to UI copy * Apply suggestions from code review Minor changes to UI text Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com> * style fixes * update jslib * Move SendOptionsExemptions warning banner * updated service params * Remove whitespace * updated jslib * Revert "updated jslib" This reverts commit 8fd141c5b77acabac81ee2995dd09870eb98593a. * updated jslib * Attachment azure upload blobs (#898) * Upload and download attachments using direct urls * Include FileUploadService dependency * Update max file size message to current max * Update jslib * Update jslib * updated service params Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com> Co-authored-by: addison <addisonbeck1@gmail.com> Co-authored-by: Matt Gibson <mgibson@bitwarden.com>
This commit is contained in:
@@ -109,6 +109,13 @@ export class PoliciesComponent implements OnInit {
|
|||||||
enabled: false,
|
enabled: false,
|
||||||
display: true,
|
display: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: this.i18nService.t('sendOptions'),
|
||||||
|
description: this.i18nService.t('sendOptionsPolicyDesc'),
|
||||||
|
type: PolicyType.SendOptions,
|
||||||
|
enabled: false,
|
||||||
|
display: true,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
await this.load();
|
await this.load();
|
||||||
|
|
||||||
|
|||||||
@@ -35,6 +35,9 @@
|
|||||||
<app-callout type="warning" *ngIf="type === policyType.DisableSend">
|
<app-callout type="warning" *ngIf="type === policyType.DisableSend">
|
||||||
{{'disableSendExemption' | i18n}}
|
{{'disableSendExemption' | i18n}}
|
||||||
</app-callout>
|
</app-callout>
|
||||||
|
<app-callout type="warning" *ngIf="type === policyType.SendOptions">
|
||||||
|
{{'sendOptionsExemption' | i18n}}
|
||||||
|
</app-callout>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" id="enabled" [(ngModel)]="enabled"
|
<input class="form-check-input" type="checkbox" id="enabled" [(ngModel)]="enabled"
|
||||||
@@ -147,6 +150,14 @@
|
|||||||
<label class="form-check-label" for="passGenIncludeNumber">{{'includeNumber' | i18n}}</label>
|
<label class="form-check-label" for="passGenIncludeNumber">{{'includeNumber' | i18n}}</label>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
<ng-container *ngIf="type === policyType.SendOptions">
|
||||||
|
<h3 class="mt-4">{{'options' | i18n}}</h3>
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" id="sendDisableHideEmail" [(ngModel)]="sendDisableHideEmail"
|
||||||
|
name="SendDisableHideEmail">
|
||||||
|
<label class="form-check-label" for="sendDisableHideEmail">{{'disableHideEmail' | i18n}}</label>
|
||||||
|
</div>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">
|
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">
|
||||||
|
|||||||
@@ -38,7 +38,6 @@ export class PolicyEditComponent implements OnInit {
|
|||||||
defaultTypes: any[];
|
defaultTypes: any[];
|
||||||
|
|
||||||
// Master password
|
// Master password
|
||||||
|
|
||||||
masterPassMinComplexity?: number = null;
|
masterPassMinComplexity?: number = null;
|
||||||
masterPassMinLength?: number;
|
masterPassMinLength?: number;
|
||||||
masterPassRequireUpper?: number;
|
masterPassRequireUpper?: number;
|
||||||
@@ -47,7 +46,6 @@ export class PolicyEditComponent implements OnInit {
|
|||||||
masterPassRequireSpecial?: number;
|
masterPassRequireSpecial?: number;
|
||||||
|
|
||||||
// Password generator
|
// Password generator
|
||||||
|
|
||||||
passGenDefaultType?: string;
|
passGenDefaultType?: string;
|
||||||
passGenMinLength?: number;
|
passGenMinLength?: number;
|
||||||
passGenUseUpper?: boolean;
|
passGenUseUpper?: boolean;
|
||||||
@@ -60,6 +58,9 @@ export class PolicyEditComponent implements OnInit {
|
|||||||
passGenCapitalize?: boolean;
|
passGenCapitalize?: boolean;
|
||||||
passGenIncludeNumber?: boolean;
|
passGenIncludeNumber?: boolean;
|
||||||
|
|
||||||
|
// Send options
|
||||||
|
sendDisableHideEmail?: boolean;
|
||||||
|
|
||||||
private policy: PolicyResponse;
|
private policy: PolicyResponse;
|
||||||
|
|
||||||
constructor(private apiService: ApiService, private i18nService: I18nService,
|
constructor(private apiService: ApiService, private i18nService: I18nService,
|
||||||
@@ -113,6 +114,9 @@ export class PolicyEditComponent implements OnInit {
|
|||||||
this.masterPassRequireNumbers = this.policy.data.requireNumbers;
|
this.masterPassRequireNumbers = this.policy.data.requireNumbers;
|
||||||
this.masterPassRequireSpecial = this.policy.data.requireSpecial;
|
this.masterPassRequireSpecial = this.policy.data.requireSpecial;
|
||||||
break;
|
break;
|
||||||
|
case PolicyType.SendOptions:
|
||||||
|
this.sendDisableHideEmail = this.policy.data.disableHideEmail;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -159,6 +163,11 @@ export class PolicyEditComponent implements OnInit {
|
|||||||
requireSpecial: this.masterPassRequireSpecial,
|
requireSpecial: this.masterPassRequireSpecial,
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
|
case PolicyType.SendOptions:
|
||||||
|
request.data = {
|
||||||
|
disableHideEmail: this.sendDisableHideEmail,
|
||||||
|
};
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,13 @@
|
|||||||
<div class="col-12 text-center" *ngIf="creatorIdentifier != null">
|
<div class="col-12 text-center" *ngIf="creatorIdentifier != null">
|
||||||
<p>{{'sendCreatorIdentifier' | i18n: creatorIdentifier }}</p>
|
<p>{{'sendCreatorIdentifier' | i18n: creatorIdentifier }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-8" *ngIf="creatorIdentifier == null && !loading && !unavailable">
|
||||||
|
<app-callout type="warning" title="{{'warning' | i18n}}">
|
||||||
|
{{'viewSendHiddenEmailWarning' | i18n }} <a href="https://bitwarden.com/help/article/receive-send/">{{'learnMore' | i18n}}</a>.
|
||||||
|
</app-callout>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row justify-content-center">
|
||||||
<div class="col-5">
|
<div class="col-5">
|
||||||
<div class="card d-block">
|
<div class="card d-block">
|
||||||
<div class="card-body" *ngIf="loading" class="text-center">
|
<div class="card-body" *ngIf="loading" class="text-center">
|
||||||
|
|||||||
@@ -12,6 +12,12 @@
|
|||||||
<app-callout *ngIf="disableSend">
|
<app-callout *ngIf="disableSend">
|
||||||
<span>{{'sendDisabledWarning' | i18n}}</span>
|
<span>{{'sendDisabledWarning' | i18n}}</span>
|
||||||
</app-callout>
|
</app-callout>
|
||||||
|
<app-callout *ngIf="!disableSend && disableHideEmail">
|
||||||
|
<span>{{'sendOptionsPolicyInEffect' | i18n}}</span>
|
||||||
|
<ul class="mb-0">
|
||||||
|
<li>{{'sendDisableHideEmailInEffect' | i18n}}</li>
|
||||||
|
</ul>
|
||||||
|
</app-callout>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-6 form-group">
|
<div class="col-6 form-group">
|
||||||
<label for="name">{{'name' | i18n}}</label>
|
<label for="name">{{'name' | i18n}}</label>
|
||||||
@@ -207,6 +213,15 @@
|
|||||||
[readOnly]="disableSend"></textarea>
|
[readOnly]="disableSend"></textarea>
|
||||||
<div class="form-text text-muted small">{{'sendNotesDesc' | i18n}}</div>
|
<div class="form-text text-muted small">{{'sendNotesDesc' | i18n}}</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<div class="form-check">
|
||||||
|
<input class="form-check-input" type="checkbox" [(ngModel)]="send.hideEmail" id="hideEmail"
|
||||||
|
name="HideEmail" [disabled]="(disableHideEmail && !send.hideEmail) || disableSend">
|
||||||
|
<label class="form-check-label" for="hideEmail">
|
||||||
|
{{'hideEmail' | i18n}}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<div class="form-check">
|
<div class="form-check">
|
||||||
<input class="form-check-input" type="checkbox" [(ngModel)]="send.disabled" id="disabled"
|
<input class="form-check-input" type="checkbox" [(ngModel)]="send.disabled" id="disabled"
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ import { CryptoFunctionService as CryptoFunctionServiceAbstraction } from 'jslib
|
|||||||
import { EnvironmentService as EnvironmentServiceAbstraction } from 'jslib/abstractions/environment.service';
|
import { EnvironmentService as EnvironmentServiceAbstraction } from 'jslib/abstractions/environment.service';
|
||||||
import { EventService as EventLoggingServiceAbstraction } from 'jslib/abstractions/event.service';
|
import { EventService as EventLoggingServiceAbstraction } from 'jslib/abstractions/event.service';
|
||||||
import { ExportService as ExportServiceAbstraction } from 'jslib/abstractions/export.service';
|
import { ExportService as ExportServiceAbstraction } from 'jslib/abstractions/export.service';
|
||||||
import { FileUploadService as FileUploadServiceAbstraction } from 'jslib/abstractions/fileUpload.service';
|
import { FileUploadService as FileUploadServiceAbstraction } from 'jslib/abstractions/fileUpload.service';
|
||||||
import { FolderService as FolderServiceAbstraction } from 'jslib/abstractions/folder.service';
|
import { FolderService as FolderServiceAbstraction } from 'jslib/abstractions/folder.service';
|
||||||
import { I18nService as I18nServiceAbstraction } from 'jslib/abstractions/i18n.service';
|
import { I18nService as I18nServiceAbstraction } from 'jslib/abstractions/i18n.service';
|
||||||
import { ImportService as ImportServiceAbstraction } from 'jslib/abstractions/import.service';
|
import { ImportService as ImportServiceAbstraction } from 'jslib/abstractions/import.service';
|
||||||
|
|||||||
@@ -3416,6 +3416,9 @@
|
|||||||
"removePasswordConfirmation": {
|
"removePasswordConfirmation": {
|
||||||
"message": "Are you sure you want to remove the password?"
|
"message": "Are you sure you want to remove the password?"
|
||||||
},
|
},
|
||||||
|
"hideEmail": {
|
||||||
|
"message": "Hide my email address from recipients."
|
||||||
|
},
|
||||||
"disableThisSend": {
|
"disableThisSend": {
|
||||||
"message": "Disable this Send so that no one can access it.",
|
"message": "Disable this Send so that no one can access it.",
|
||||||
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||||
@@ -3635,6 +3638,28 @@
|
|||||||
"message": "Due to an enterprise policy, you are only able to delete an existing Send.",
|
"message": "Due to an enterprise policy, you are only able to delete an existing Send.",
|
||||||
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||||
},
|
},
|
||||||
|
"sendOptions": {
|
||||||
|
"message": "Send Options",
|
||||||
|
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||||
|
},
|
||||||
|
"sendOptionsPolicyDesc": {
|
||||||
|
"message": "Set options for creating and editing Sends.",
|
||||||
|
"description": "'Sends' is a plural noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||||
|
},
|
||||||
|
"sendOptionsExemption": {
|
||||||
|
"message": "Organization users that can manage the organization's policies are exempt from this policy's enforcement."
|
||||||
|
},
|
||||||
|
"disableHideEmail": {
|
||||||
|
"message": "Do not allow users to hide their email address from recipients when creating or editing a Send.",
|
||||||
|
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||||
|
},
|
||||||
|
"sendOptionsPolicyInEffect": {
|
||||||
|
"message": "The following organization policies are currently in effect:"
|
||||||
|
},
|
||||||
|
"sendDisableHideEmailInEffect": {
|
||||||
|
"message": "Users are not allowed to hide their email address from recipients when creating or editing a Send.",
|
||||||
|
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||||
|
},
|
||||||
"modifiedPolicyId": {
|
"modifiedPolicyId": {
|
||||||
"message": "Modified policy $ID$.",
|
"message": "Modified policy $ID$.",
|
||||||
"placeholders": {
|
"placeholders": {
|
||||||
@@ -3775,6 +3800,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"viewSendHiddenEmailWarning": {
|
||||||
|
"message": "The Bitwarden user who created this Send has chosen to hide their email address. You should ensure you trust the source of this link before using or downloading its content.",
|
||||||
|
"description": "'Send' is a noun and the name of a feature called 'Bitwarden Send'. It should not be translated."
|
||||||
|
},
|
||||||
"expirationDateIsInvalid": {
|
"expirationDateIsInvalid": {
|
||||||
"message": "The expiration date provided is not valid."
|
"message": "The expiration date provided is not valid."
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user