Disable user account in integration mode

This commit is contained in:
yflory 2023-01-19 16:34:01 +01:00 committed by Wolfgang Ginolas
parent 5081d5d3c0
commit 368dd79883
3 changed files with 6 additions and 2 deletions

View File

@ -2529,6 +2529,7 @@ define([
form_seed: localStorage.CP_formSeed,
cache: rdyCfg.cache,
noDrive: rdyCfg.noDrive,
neverDrive: rdyCfg.neverDrive,
disableCache: localStorage['CRYPTPAD_STORE|disableCache'],
driveEvents: !rdyCfg.noDrive, //rdyCfg.driveEvents // Boolean
lastVisit: Number(localStorage.lastVisit) || undefined

View File

@ -3198,7 +3198,9 @@ define([
// First tab, no user hash, no anon hash and this app doesn't need a drive
// ==> don't create a drive
if (data.noDrive && !data.userHash && !data.anonHash) {
// Or "neverDrive" (integration into another platform?)
// ==> don't create a drive
if (data.neverDrive || (data.noDrive && !data.userHash && !data.anonHash)) {
return void onNoDrive(clientId, function (obj) {
if (obj && obj.error) {
// if we can't properly initialize the noDrive mode, use normal mode

View File

@ -267,9 +267,10 @@ define([
// We're only going to check if a hash exists in the URL or not.
Cryptpad.ready(waitFor(), {
noDrive: cfg.noDrive && AppConfig.allowDrivelessMode && currentPad.hash,
neverDrive: cfg.integration, // XXX we may want integration with drive later
driveEvents: cfg.driveEvents,
cache: Boolean(cfg.cache),
currentPad: currentPad
currentPad: currentPad,
});
// Remove the login hash if needed