1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

Only org to single org (#680)

* change OnlyOrg references to SingleOrg

* updated jslib

* change OnlyOrg references to SingleOrg

* missed a reference to OnlyOrg in messages
This commit is contained in:
Addison Beck 2020-10-27 10:28:57 -04:00 committed by GitHub
parent f6946085d8
commit ebe5a6030e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 21 additions and 21 deletions

2
jslib

@ -1 +1 @@
Subproject commit d84d6da7f77ec89ba69299b1ff982f083fd77203
Subproject commit 76c09641ba8ef6cdbf74977a7a719b9aa099edb7

View File

@ -80,9 +80,9 @@ export class PoliciesComponent implements OnInit {
display: true,
},
{
name: this.i18nService.t('onlyOrg'),
description: this.i18nService.t('onlyOrgDesc'),
type: PolicyType.OnlyOrg,
name: this.i18nService.t('singleOrg'),
description: this.i18nService.t('singleOrgDesc'),
type: PolicyType.SingleOrg,
enabled: false,
display: true,
},

View File

@ -17,9 +17,9 @@
title="{{'warning' | i18n}}" icon="fa-warning">
{{'twoStepLoginPolicyWarning' | i18n}}
</app-callout>
<app-callout type="warning" *ngIf="type === policyType.OnlyOrg" title="{{'warning' | i18n}}"
<app-callout type="warning" *ngIf="type === policyType.SingleOrg" title="{{'warning' | i18n}}"
icon="fa-warning">
{{'onlyOrgPolicyWarning' | i18n}}
{{'singleOrgPolicyWarning' | i18n}}
</app-callout>
<app-callout type="tip" title="{{'prerequisite' | i18n}}" *ngIf="type === policyType.RequireSso">
{{'requireSsoPolicyReq' | i18n}}

View File

@ -178,9 +178,9 @@ export class PolicyEditComponent implements OnInit {
if (!this.enabled) { // Don't need prevalidation checks if submitting to disable
return true;
}
// Have OnlyOrg policy enabled?
if (!(this.policiesEnabledMap.has(PolicyType.OnlyOrg)
&& this.policiesEnabledMap.get(PolicyType.OnlyOrg))) {
// Have SingleOrg policy enabled?
if (!(this.policiesEnabledMap.has(PolicyType.SingleOrg)
&& this.policiesEnabledMap.get(PolicyType.SingleOrg))) {
this.toasterService.popAsync('error', null, this.i18nService.t('requireSsoPolicyReqError'));
return false;
}

View File

@ -222,8 +222,8 @@
<small class="text-muted font-italic mt-2 d-block" *ngIf="!createOrganization">
{{'paymentCharged' | i18n : (interval | i18n) }}</small>
</div>
<div *ngIf="onlyOrgPolicyBlock" class="mt-4">
<app-callout [type]="'error'">{{'onlyOrgBlockCreateMessage' | i18n}}</app-callout>
<div *ngIf="singleOrgPolicyBlock" class="mt-4">
<app-callout [type]="'error'">{{'singleOrgBlockCreateMessage' | i18n}}</app-callout>
</div>
<div class="mt-4">
<button type="submit" class="btn btn-primary btn-submit" [disabled]="form.loading">

View File

@ -58,7 +58,7 @@ export class OrganizationPlansComponent implements OnInit {
businessName: string;
productTypes = ProductType;
formPromise: Promise<any>;
onlyOrgPolicyBlock: boolean = false;
singleOrgPolicyBlock: boolean = false;
plans: PlanResponse[];
@ -197,12 +197,12 @@ export class OrganizationPlansComponent implements OnInit {
}
async submit() {
if (this.onlyOrgPolicyBlock) {
if (this.singleOrgPolicyBlock) {
return;
} else {
const policies = await this.policyService.getAll(PolicyType.OnlyOrg);
this.onlyOrgPolicyBlock = policies.some(policy => policy.enabled);
if (this.onlyOrgPolicyBlock) {
const policies = await this.policyService.getAll(PolicyType.SingleOrg);
this.singleOrgPolicyBlock = policies.some(policy => policy.enabled);
if (this.singleOrgPolicyBlock) {
return;
}
}

View File

@ -3210,16 +3210,16 @@
"webPoliciesDeprecationWarning": {
"message": "Policy configuration has been moved, and this page will soon be deprecated. Please click below to use the Business Portal policies page instead."
},
"onlyOrg": {
"message": "Only Organization"
"singleOrg": {
"message": "Single Organization"
},
"onlyOrgDesc": {
"singleOrgDesc": {
"message": "Restrict users from being able to join any other organizations."
},
"onlyOrgBlockCreateMessage": {
"singleOrgBlockCreateMessage": {
"message": "Your current organization has a policy that does not allow you to join more than one organization. Please contact your organization admins or sign up from a different Bitwarden account."
},
"onlyOrgPolicyWarning": {
"singleOrgPolicyWarning": {
"message": "Organization members who are already a member of another organization will be removed from your organization."
},
"requireSso": {