diff --git a/server/prehandlers/disable-users.js b/server/prehandlers/disable-users.js index db046e2a..a4c77eab 100644 --- a/server/prehandlers/disable-users.js +++ b/server/prehandlers/disable-users.js @@ -7,7 +7,7 @@ const errorMessage = 'Access denied. You are not allowed create or sign in users export default async function disableUserHandler(request, reply) { const { url } = request; - if (adminSettings.get('disable_users') && (!authRegex.test(url) || !accountRegex.test(url))) { + if (adminSettings.get('disable_users') && (authRegex.test(url) || accountRegex.test(url))) { return reply.code(403).send({ error: errorMessage }); } }