mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-12 22:37:28 -08:00
If SAML required, don't accept login form post.
This commit is contained in:
parent
696943b04b
commit
a6116a1b15
|
@ -75,6 +75,7 @@ class LoginController extends Controller
|
|||
}
|
||||
|
||||
//If the environment is set to ALWAYS require SAML, go straight to the SAML route.
|
||||
//We don't need to check other settings, as this should override those.
|
||||
if((env("REQUIRE_SAML", false)))
|
||||
{
|
||||
return redirect()->route('saml.login');
|
||||
|
@ -207,6 +208,12 @@ class LoginController extends Controller
|
|||
*/
|
||||
public function login(Request $request)
|
||||
{
|
||||
//If the environment is set to ALWAYS require SAML, return access denied
|
||||
if((env("REQUIRE_SAML", false)))
|
||||
{
|
||||
return view('errors.403');
|
||||
}
|
||||
|
||||
if (Setting::getSettings()->login_common_disabled == '1') {
|
||||
return view('errors.403');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue