1
0
Fork 0
mirror of synced 2024-06-02 10:54:44 +12:00

Fixed default values

This commit is contained in:
Eldad Fux 2021-02-28 22:46:26 +02:00
parent a6edf2f227
commit 7f47bfc9f8

View file

@ -135,25 +135,25 @@ App::init(function ($utopia, $request, $response, $project, $user) {
switch ($route->getLabel('auth.type', '')) {
case 'emailPassword':
if($project->getAttribute('usersAuthEmailPassword', false) === false) {
if($project->getAttribute('usersAuthEmailPassword', true) === false) {
throw new Exception('Email / Password authentication is disabled for this project', 501);
}
break;
case 'anonymous':
if($project->getAttribute('usersAuthAnonymous', false) === false) {
if($project->getAttribute('usersAuthAnonymous', true) === false) {
throw new Exception('Anonymous authentication is disabled for this project', 501);
}
break;
case 'invites':
if($project->getAttribute('usersAuthInvites', false) === false) {
if($project->getAttribute('usersAuthInvites', true) === false) {
throw new Exception('Invites authentication is disabled for this project', 501);
}
break;
case 'jwt':
if($project->getAttribute('usersAuthJWT', false) === false) {
if($project->getAttribute('usersAuthJWT', true) === false) {
throw new Exception('JWT authentication is disabled for this project', 501);
}
break;