Update to Laravel 8
Co-authored-by: Matthew Penner <me@matthewp.io>
This commit is contained in:
parent
028921b42a
commit
a043071e3c
211 changed files with 4394 additions and 2933 deletions
|
@ -59,14 +59,14 @@ class RequireTwoFactorAuthentication
|
|||
return $next($request);
|
||||
}
|
||||
|
||||
$level = (int)config('pterodactyl.auth.2fa_required');
|
||||
$level = (int) config('pterodactyl.auth.2fa_required');
|
||||
// If this setting is not configured, or the user is already using 2FA then we can just
|
||||
// send them right through, nothing else needs to be checked.
|
||||
//
|
||||
// If the level is set as admin and the user is not an admin, pass them through as well.
|
||||
if ($level === self::LEVEL_NONE || $user->use_totp) {
|
||||
return $next($request);
|
||||
} else if ($level === self::LEVEL_ADMIN && ! $user->root_admin) {
|
||||
} elseif ($level === self::LEVEL_ADMIN && ! $user->root_admin) {
|
||||
return $next($request);
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue