aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/helpers/custom-validators/users.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/helpers/custom-validators/users.ts b/server/helpers/custom-validators/users.ts
index 105c36600..b04970108 100644
--- a/server/helpers/custom-validators/users.ts
+++ b/server/helpers/custom-validators/users.ts
@@ -90,7 +90,7 @@ function isUserBlockedReasonValid (value: any) {
90} 90}
91 91
92function isUserRoleValid (value: any) { 92function isUserRoleValid (value: any) {
93 return exists(value) && validator.isInt('' + value) && UserRole[value] !== undefined 93 return exists(value) && validator.isInt('' + value) && [ UserRole.ADMINISTRATOR, UserRole.MODERATOR, UserRole.USER ].includes(value)
94} 94}
95 95
96// --------------------------------------------------------------------------- 96// ---------------------------------------------------------------------------