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
This commit is contained in:
Josh Morel 2018-11-21 02:48:29 -05:00 committed by Chocobozzz
parent 04b8c3fba6
commit fc2ec87a8c
12 changed files with 88 additions and 3 deletions

View file

@ -262,6 +262,7 @@ async function updateUser (req: express.Request, res: express.Response, next: ex
const roleChanged = body.role !== undefined && body.role !== userToUpdate.role
if (body.email !== undefined) userToUpdate.email = body.email
if (body.emailVerified !== undefined) userToUpdate.emailVerified = body.emailVerified
if (body.videoQuota !== undefined) userToUpdate.videoQuota = body.videoQuota
if (body.videoQuotaDaily !== undefined) userToUpdate.videoQuotaDaily = body.videoQuotaDaily
if (body.role !== undefined) userToUpdate.role = body.role