Reworked authentication related menu item handling (fixes #1462)

This commit is contained in:
Bernd Bestel
2021-07-03 19:40:42 +02:00
parent bcf963ac49
commit 47c936e026
8 changed files with 25 additions and 20 deletions

View File

@@ -10,12 +10,9 @@ class ReverseProxyAuthMiddleware extends AuthMiddleware
{
public function authenticate(Request $request)
{
$db = DatabaseService::getInstance()->GetDbConnection();
define('GROCY_EXTERNALLY_MANAGED_AUTHENTICATION', true);
if (!defined('GROCY_SHOW_AUTH_VIEWS'))
{
define('GROCY_SHOW_AUTH_VIEWS', false);
}
$db = DatabaseService::getInstance()->GetDbConnection();
// API key authentication is also ok
$auth = new ApiKeyAuthMiddleware($this->AppContainer, $this->ResponseFactory);