aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
authorJosh Morel <morel.josh@hotmail.com>2018-08-31 03:18:19 -0400
committerChocobozzz <me@florianbigard.com>2018-08-31 09:18:19 +0200
commitd9eaee3939bf2e93e5d775d32bce77842201faba (patch)
treec115acb3611986b98f51b3addf29ebe66f63ee7f /client/src/app/+admin
parent04291e1ba44032165388758e993d385a10c1c5a1 (diff)
downloadPeerTube-d9eaee3939bf2e93e5d775d32bce77842201faba.tar.gz
PeerTube-d9eaee3939bf2e93e5d775d32bce77842201faba.tar.zst
PeerTube-d9eaee3939bf2e93e5d775d32bce77842201faba.zip
add user account email verificiation (#977)
* add user account email verificiation includes server and client code to: * enable verificationRequired via custom config * send verification email with registration * ask for verification email * verify via email * prevent login if not verified and required * conditional client links to ask for new verification email * allow login for verified=null these are users created when verification not required should still be able to login when verification is enabled * refactor email verifcation pr * change naming from verified to emailVerified * change naming from askVerifyEmail to askSendVerifyEmail * undo unrelated automatic prettier formatting on api/config * use redirectService for home * remove redundant success notification on email verified * revert test.yaml smpt host
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html5
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts5
2 files changed, 9 insertions, 1 deletions
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
index ca7890d84..a0f0abd10 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.html
@@ -91,6 +91,11 @@
91 i18n-labelText labelText="Signup enabled" 91 i18n-labelText labelText="Signup enabled"
92 ></my-peertube-checkbox> 92 ></my-peertube-checkbox>
93 93
94 <my-peertube-checkbox *ngIf="isSignupEnabled()"
95 inputName="signupRequiresEmailVerification" formControlName="signupRequiresEmailVerification"
96 i18n-labelText labelText="Signup requires email verification"
97 ></my-peertube-checkbox>
98
94 <div *ngIf="isSignupEnabled()" class="form-group"> 99 <div *ngIf="isSignupEnabled()" class="form-group">
95 <label i18n for="signupLimit">Signup limit</label> 100 <label i18n for="signupLimit">Signup limit</label>
96 <input 101 <input
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
index 248b0df50..ce2ea8a6c 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
@@ -90,6 +90,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
90 cacheCaptionsSize: this.customConfigValidatorsService.CACHE_CAPTIONS_SIZE, 90 cacheCaptionsSize: this.customConfigValidatorsService.CACHE_CAPTIONS_SIZE,
91 signupEnabled: null, 91 signupEnabled: null,
92 signupLimit: this.customConfigValidatorsService.SIGNUP_LIMIT, 92 signupLimit: this.customConfigValidatorsService.SIGNUP_LIMIT,
93 signupRequiresEmailVerification: null,
93 importVideosHttpEnabled: null, 94 importVideosHttpEnabled: null,
94 importVideosTorrentEnabled: null, 95 importVideosTorrentEnabled: null,
95 adminEmail: this.customConfigValidatorsService.ADMIN_EMAIL, 96 adminEmail: this.customConfigValidatorsService.ADMIN_EMAIL,
@@ -187,7 +188,8 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
187 }, 188 },
188 signup: { 189 signup: {
189 enabled: this.form.value['signupEnabled'], 190 enabled: this.form.value['signupEnabled'],
190 limit: this.form.value['signupLimit'] 191 limit: this.form.value['signupLimit'],
192 requiresEmailVerification: this.form.value['signupRequiresEmailVerification']
191 }, 193 },
192 admin: { 194 admin: {
193 email: this.form.value['adminEmail'] 195 email: this.form.value['adminEmail']
@@ -250,6 +252,7 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
250 cacheCaptionsSize: this.customConfig.cache.captions.size, 252 cacheCaptionsSize: this.customConfig.cache.captions.size,
251 signupEnabled: this.customConfig.signup.enabled, 253 signupEnabled: this.customConfig.signup.enabled,
252 signupLimit: this.customConfig.signup.limit, 254 signupLimit: this.customConfig.signup.limit,
255 signupRequiresEmailVerification: this.customConfig.signup.requiresEmailVerification,
253 adminEmail: this.customConfig.admin.email, 256 adminEmail: this.customConfig.admin.email,
254 userVideoQuota: this.customConfig.user.videoQuota, 257 userVideoQuota: this.customConfig.user.videoQuota,
255 userVideoQuotaDaily: this.customConfig.user.videoQuotaDaily, 258 userVideoQuotaDaily: this.customConfig.user.videoQuotaDaily,