Allow calendar edition for guests

pull/1/head
yflory 3 years ago
parent 4cb5d65989
commit 2476a2ca2a

@ -543,7 +543,7 @@ define([
var hash = Hash.getEditHashFromKeys(secret); var hash = Hash.getEditHashFromKeys(secret);
var roHash = Hash.getViewHashFromKeys(secret); var roHash = Hash.getViewHashFromKeys(secret);
if (!ctx.loggedIn) { hash = undefined; } //if (!ctx.loggedIn) { hash = undefined; }
var cal = { var cal = {
href: hash && Hash.hashToHref(hash, 'calendar'), href: hash && Hash.hashToHref(hash, 'calendar'),
@ -926,7 +926,7 @@ define([
} }
if (cmd === 'IMPORT_ICS') { if (cmd === 'IMPORT_ICS') {
if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); } 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); return void importICSCalendar(ctx, data, clientId, cb);
} }
if (cmd === 'ADD') { if (cmd === 'ADD') {
@ -946,7 +946,7 @@ define([
} }
if (cmd === 'UPDATE') { if (cmd === 'UPDATE') {
if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); } 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); return void updateCalendar(ctx, data, clientId, cb);
} }
if (cmd === 'DELETE') { if (cmd === 'DELETE') {
@ -956,17 +956,17 @@ define([
} }
if (cmd === 'CREATE_EVENT') { if (cmd === 'CREATE_EVENT') {
if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); } 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); return void createEvent(ctx, data, clientId, cb);
} }
if (cmd === 'UPDATE_EVENT') { if (cmd === 'UPDATE_EVENT') {
if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); } 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); return void updateEvent(ctx, data, clientId, cb);
} }
if (cmd === 'DELETE_EVENT') { if (cmd === 'DELETE_EVENT') {
if (ctx.store.offline) { return void cb({error: 'OFFLINE'}); } 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); return void deleteEvent(ctx, data, clientId, cb);
} }
}; };

Loading…
Cancel
Save