From a5246df3ede1bfdf98fc44bf9d6ec21c384bf59b Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 19 Jul 2018 22:04:16 -0400 Subject: [PATCH] check for email verified on premium license upload --- src/app/settings/premium.component.ts | 6 ++++++ src/locales/en/messages.json | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/app/settings/premium.component.ts b/src/app/settings/premium.component.ts index 5e7975d2..4903d10c 100644 --- a/src/app/settings/premium.component.ts +++ b/src/app/settings/premium.component.ts @@ -61,6 +61,12 @@ export class PremiumComponent implements OnInit { try { if (this.selfHosted) { + if (!this.tokenService.getEmailVerified()) { + this.toasterService.popAsync('error', this.i18nService.t('errorOccurred'), + this.i18nService.t('verifyEmailFirst')); + return; + } + const fd = new FormData(); fd.append('license', files[0]); this.formPromise = this.apiService.postAccountLicense(fd).then(() => { diff --git a/src/locales/en/messages.json b/src/locales/en/messages.json index 38654327..d5524bcd 100644 --- a/src/locales/en/messages.json +++ b/src/locales/en/messages.json @@ -2106,6 +2106,9 @@ "verifyEmailDesc": { "message": "Verify your account's email address to unlock access to all features." }, + "verifyEmailFirst": { + "message": "Your account's email address first must be verified." + }, "checkInboxForVerification": { "message": "Check your email inbox for a verification link." },