mirror of
https://github.com/grocy/grocy.git
synced 2026-03-28 07:39:25 +01:00
handle responses returned by authenticate in AuthMiddleware
This commit is contained in:
parent
e01e0f3abe
commit
1616b41ea9
|
|
@ -67,6 +67,10 @@ abstract class AuthMiddleware extends BaseMiddleware
|
|||
return $response->withStatus(302)->withHeader('Location', $this->AppContainer->get('UrlManager')->ConstructUrl('/login'));
|
||||
}
|
||||
}
|
||||
else if ($user instanceof Response)
|
||||
{
|
||||
return $user;
|
||||
}
|
||||
else
|
||||
{
|
||||
define('GROCY_AUTHENTICATED', true);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user