Skip to content

Commit

Permalink
add maintenance mode
Browse files Browse the repository at this point in the history
  • Loading branch information
PandorasActorMS committed Aug 19, 2024
1 parent 5088834 commit 8d8870a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions private/pages/login.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@
<button type="submit" name="submit">' . $translation['Login'] . '</button >
</form>';
}
if ((isset($env) ? strtolower($env["Authentication"]) : strtolower(getenv("Authentication"))) == "you_shall_not_pass") {
$login_available = true;
echo
'HM-KI ist im Wartungsmodus.';
}
if (!$login_available) {
echo 'No authentication method defined';
die;
Expand Down
5 changes: 5 additions & 0 deletions private/pages/oidc_login.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@

$_SESSION['username'] = $oidc->requestUserInfo('email');

//TODO: check for affiliation
if ((isset($env) ? strtolower($env["Authentication"]) : strtolower(getenv("Authentication"))) == "you_shall_not_pass") {
header("Location: /login")
}

header("Location: /interface");
exit();

Expand Down

0 comments on commit 8d8870a

Please sign in to comment.