mirror of
https://github.com/GCMatters/hermes.git
synced 2026-02-04 05:30:13 +01:00
fix: fix acces for logged out visitors
This commit is contained in:
@@ -6,18 +6,20 @@ const eventId = urlParams.get('event');
|
||||
|
||||
document.addEventListener("DOMContentLoaded", async () => {
|
||||
|
||||
var container = document.getElementById("mainContainer");
|
||||
var user = await getMyAccount();
|
||||
var org_id: number = -1;
|
||||
const modifyBtn = document.getElementById( "editBtn");
|
||||
var container = document.getElementById("mainContainer");
|
||||
const modifyBtn = document.getElementById("editBtn");
|
||||
const removeBtn = document.getElementById("removeBtn");
|
||||
var org_id: number = -1;
|
||||
|
||||
if (user) {
|
||||
if (user.isOrganisation) {
|
||||
org_id = user.organisationId;
|
||||
try {
|
||||
var user = await getMyAccount();
|
||||
if (user) {
|
||||
if (user.isOrganisation) {
|
||||
org_id = user.organisationId;
|
||||
}
|
||||
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