aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/middlewares/validators
diff options
context:
space:
mode:
authorJosh Morel <morel.josh@hotmail.com>2018-11-21 02:48:29 -0500
committerChocobozzz <me@florianbigard.com>2018-11-21 08:48:29 +0100
commitfc2ec87a8c4dcfbb91a1a62cf4c07a2a8e6a50fe (patch)
treea2cea5e299c5f1a731da99277949ea2f0bb35659 /server/middlewares/validators
parent04b8c3fba614efc3827f583096c78b08cb668470 (diff)
downloadPeerTube-fc2ec87a8c4dcfbb91a1a62cf4c07a2a8e6a50fe.tar.gz
PeerTube-fc2ec87a8c4dcfbb91a1a62cf4c07a2a8e6a50fe.tar.zst
PeerTube-fc2ec87a8c4dcfbb91a1a62cf4c07a2a8e6a50fe.zip
enable email verification by admin (#1348)
* enable email verification by admin * rename/label to set email as verified to be more explicit that admin is not sending another email to confirm * add update user emailVerified check-params test * make user.model emailVerified property required
Diffstat (limited to 'server/middlewares/validators')
-rw-r--r--server/middlewares/validators/users.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/middlewares/validators/users.ts b/server/middlewares/validators/users.ts
index 61297120a..ccaf2eeb6 100644
--- a/server/middlewares/validators/users.ts
+++ b/server/middlewares/validators/users.ts
@@ -114,6 +114,7 @@ const deleteMeValidator = [
114const usersUpdateValidator = [ 114const usersUpdateValidator = [
115 param('id').isInt().not().isEmpty().withMessage('Should have a valid id'), 115 param('id').isInt().not().isEmpty().withMessage('Should have a valid id'),
116 body('email').optional().isEmail().withMessage('Should have a valid email attribute'), 116 body('email').optional().isEmail().withMessage('Should have a valid email attribute'),
117 body('emailVerified').optional().isBoolean().withMessage('Should have a valid email verified attribute'),
117 body('videoQuota').optional().custom(isUserVideoQuotaValid).withMessage('Should have a valid user quota'), 118 body('videoQuota').optional().custom(isUserVideoQuotaValid).withMessage('Should have a valid user quota'),
118 body('videoQuotaDaily').optional().custom(isUserVideoQuotaDailyValid).withMessage('Should have a valid daily user quota'), 119 body('videoQuotaDaily').optional().custom(isUserVideoQuotaDailyValid).withMessage('Should have a valid daily user quota'),
119 body('role').optional().custom(isUserRoleValid).withMessage('Should have a valid role'), 120 body('role').optional().custom(isUserRoleValid).withMessage('Should have a valid role'),