mirror of
https://github.com/GCMatters/hermes.git
synced 2026-02-04 13:40:13 +01:00
fix: fix acces for logged out visitors
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user