From 2476a2ca2a7e23d20abfe7b39453c49cd21f8dc4 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 5 Jan 2022 17:03:09 +0100 Subject: [PATCH] Allow calendar edition for guests --- www/common/outer/calendar.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/www/common/outer/calendar.js b/www/common/outer/calendar.js index a0b990e89..f76893fa3 100644 --- a/www/common/outer/calendar.js +++ b/www/common/outer/calendar.js @@ -543,7 +543,7 @@ define([ var hash = Hash.getEditHashFromKeys(secret); var roHash = Hash.getViewHashFromKeys(secret); - if (!ctx.loggedIn) { hash = undefined; } + //if (!ctx.loggedIn) { hash = undefined; } var cal = { href: hash && Hash.hashToHref(hash, 'calendar'), @@ -926,7 +926,7 @@ define([ } if (cmd === 'IMPORT_ICS') { if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); } - if (!ctx.loggedIn) { return void cb({error: 'NOT_LOGGED_IN'}); } + //if (!ctx.loggedIn) { return void cb({error: 'NOT_LOGGED_IN'}); } return void importICSCalendar(ctx, data, clientId, cb); } if (cmd === 'ADD') { @@ -946,7 +946,7 @@ define([ } if (cmd === 'UPDATE') { if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); } - if (!ctx.loggedIn) { return void cb({error: 'NOT_LOGGED_IN'}); } + //if (!ctx.loggedIn) { return void cb({error: 'NOT_LOGGED_IN'}); } return void updateCalendar(ctx, data, clientId, cb); } if (cmd === 'DELETE') { @@ -956,17 +956,17 @@ define([ } if (cmd === 'CREATE_EVENT') { if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); } - if (!ctx.loggedIn) { return void cb({error: 'NOT_LOGGED_IN'}); } + //if (!ctx.loggedIn) { return void cb({error: 'NOT_LOGGED_IN'}); } return void createEvent(ctx, data, clientId, cb); } if (cmd === 'UPDATE_EVENT') { if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); } - if (!ctx.loggedIn) { return void cb({error: 'NOT_LOGGED_IN'}); } + //if (!ctx.loggedIn) { return void cb({error: 'NOT_LOGGED_IN'}); } return void updateEvent(ctx, data, clientId, cb); } if (cmd === 'DELETE_EVENT') { if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); } - if (!ctx.loggedIn) { return void cb({error: 'NOT_LOGGED_IN'}); } + //if (!ctx.loggedIn) { return void cb({error: 'NOT_LOGGED_IN'}); } return void deleteEvent(ctx, data, clientId, cb); } };