Fixed default values
This commit is contained in:
parent
a6edf2f227
commit
7f47bfc9f8
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue