fix: fix acces for logged out visitors

This commit is contained in:
2025-05-19 04:54:06 +02:00
parent ace54fb4ef
commit 07702b93b1
6 changed files with 62 additions and 46 deletions

View File

@@ -53,13 +53,16 @@ async function modifyEvent()
document.addEventListener("DOMContentLoaded", async () => {
var container = document.getElementById("mainContainer");
const saveBtn = document.getElementById("saveBtn");
var user = await getMyAccount();
if (user) {
if (user.isOrganisation) {
unhideElementById(document, "mainContainer");
try {
var user = await getMyAccount();
if (user) {
if (user.isOrganisation) {
unhideElementById(document, "mainContainer");
}
unhideElementById(document, "logout-btn");
}
unhideElementById(document, "logout-btn");
} else {
} catch {
unhideElementById(document, "joinnow-btn");
unhideElementById(document, "signin-btn");
}