Enable spreadsheets for anonymous users

This commit is contained in:
yflory 2020-01-15 15:33:52 +01:00
parent 884350f8f7
commit 9e1f49c177
2 changed files with 5 additions and 3 deletions

View file

@ -20,7 +20,7 @@ define(function() {
* users and these users will be redirected to the login page if they still try to access
* the app
*/
config.registeredOnlyTypes = ['file', 'contacts', 'oodoc', 'ooslide', 'sheet', 'notifications'];
config.registeredOnlyTypes = ['file', 'contacts', 'oodoc', 'ooslide', 'notifications'];
/* CryptPad is available is multiple languages, but only English and French are maintained
* by the developers. The other languages may be outdated, and any missing string for a langauge

View file

@ -584,7 +584,9 @@ define([
ooChannel.cpIndex++;
ooChannel.lastHash = hash;
// Check if a checkpoint is needed
if (ooChannel.cpIndex % CHECKPOINT_INTERVAL === 0) {
var lastCp = getLastCp();
if (common.isLoggedIn() && (ooChannel.cpIndex % CHECKPOINT_INTERVAL === 0 ||
(ooChannel.cpIndex - lastCp.index) > CHECKPOINT_INTERVAL)) {
makeCheckpoint();
}
// Remove my lock
@ -662,7 +664,7 @@ define([
var startOO = function (blob, file) {
if (APP.ooconfig) { return void console.error('already started'); }
var url = URL.createObjectURL(blob);
var lock = readOnly || !common.isLoggedIn();
var lock = readOnly;// || !common.isLoggedIn();
// Config
APP.ooconfig = {