1
0
mirror of https://github.com/mailcow/mailcow-dockerized.git synced 2024-11-21 17:16:54 +02:00

[Web] fix identity_provider get-redirect

This commit is contained in:
FreddleSpl0it 2024-01-12 11:56:31 +01:00
parent e8c122029d
commit 3848a6dae2
No known key found for this signature in database
GPG Key ID: 00E14E7634F4BEC5
2 changed files with 6 additions and 2 deletions

View File

@ -2403,7 +2403,7 @@ function identity_provider($_action, $_data = null, $_extra = null) {
break;
case "get-redirect":
$iam_settings = identity_provider('get');
if ($iam_settings['authsource'] !== 'keycloak' || $iam_settings['authsource'] !== 'generic-oidc')
if ($iam_settings['authsource'] != 'keycloak' && $iam_settings['authsource'] != 'generic-oidc')
return false;
$provider = $_data['iam_provider'];
$authUrl = $provider->getAuthorizationUrl();

View File

@ -30,7 +30,11 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/inc/header.inc.php';
$_SESSION['return_to'] = $_SERVER['REQUEST_URI'];
$_SESSION['index_query_string'] = $_SERVER['QUERY_STRING'];
$has_iam_sso = identity_provider("get-redirect") ? true : false;
$has_iam_sso = false;
if ($iam_provider){
$has_iam_sso = identity_provider("get-redirect", array('iam_provider' => $iam_provider)) ? true : false;
}
$template = 'index.twig';
$template_data = [