Skip to content
Snippets Groups Projects
Commit 47d2be2b authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update functions.js

parent a4e8481f
No related branches found
No related tags found
No related merge requests found
...@@ -147,9 +147,6 @@ function showError($sMessage){ ...@@ -147,9 +147,6 @@ function showError($sMessage){
*/ */
async function checkSession() { async function checkSession() {
const url = "/Shibboleth.sso/Session"; const url = "/Shibboleth.sso/Session";
if(!bShowLoginOnError) {
document.getElementById('shib-select-idp').style.display = 'none';
}
try { try {
const response = await fetch(url); const response = await fetch(url);
if (!response.ok) { if (!response.ok) {
...@@ -159,6 +156,8 @@ async function checkSession() { ...@@ -159,6 +156,8 @@ async function checkSession() {
); );
if(bShowLoginOnError) { if(bShowLoginOnError) {
showFilterBox(); showFilterBox();
} else {
document.getElementById('shib-select-idp').style.display = 'none';
} }
throw new Error(`Response status: ${response.status}`); throw new Error(`Response status: ${response.status}`);
} }
...@@ -171,6 +170,9 @@ async function checkSession() { ...@@ -171,6 +170,9 @@ async function checkSession() {
} else { } else {
// console.log("Logged in already"); // console.log("Logged in already");
document.getElementById('shib-check-logged-in').style.display = 'block'; document.getElementById('shib-check-logged-in').style.display = 'block';
if(!bShowLoginOnError) {
document.getElementById('shib-select-idp').style.display = 'none';
}
} }
// ... // ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment