mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Remove previous hacky way of guessing isLoggedIn
- Remove reference to `drive.uo.curvePublic` (f8442e9b98)
- Add `common` information to `data` when sent to `make-backup.js`
This commit is contained in:
parent
db620fc81f
commit
08deef098d
@ -4742,6 +4742,7 @@ define([
|
||||
data.sharedFolderId = sfId;
|
||||
data.name = Util.fixFileName(folderName);
|
||||
data.folderName = Util.fixFileName(folderName) + '.zip';
|
||||
data.common = common;
|
||||
|
||||
var uo = manager.user.userObject;
|
||||
if (sfId && manager.folders[sfId]) {
|
||||
|
||||
@ -348,17 +348,14 @@ define([
|
||||
max: 0,
|
||||
done: 0,
|
||||
cache: cache,
|
||||
sframeChan: sframeChan
|
||||
sframeChan: sframeChan,
|
||||
common: data.common,
|
||||
};
|
||||
var filesData = data.sharedFolderId && ctx.sf[data.sharedFolderId] ? ctx.sf[data.sharedFolderId].filesData : ctx.data.filesData;
|
||||
var links = ctx.sf[data.sharedFolderId] && ctx.sf[data.sharedFolderId].static ? ctx.data.static && ctx.sf[data.sharedFolderId].static : ctx.data.static;
|
||||
|
||||
if (!data.uo.curvePublic && Object.keys(ctx.data.root).length === 0) {
|
||||
if (ctx.common && !ctx.common.isLoggedIn()) {
|
||||
// Anonymous Drive
|
||||
// In anonymous drive, there are no root folder in the data
|
||||
// We are going to emulate it
|
||||
// One false positive: empty team drive but the result is
|
||||
// functionally equivalent
|
||||
console.log("Anonymous drive"); // XXX: remove after testing phase
|
||||
ctx.data.root = {};
|
||||
let index = 0;
|
||||
|
||||
@ -1196,6 +1196,7 @@ define([
|
||||
Feedback.send('FULL_DRIVE_EXPORT_START');
|
||||
var todo = function(data, filename) {
|
||||
var ui = Backup.createExportUI(privateData.origin);
|
||||
data.common = common;
|
||||
|
||||
var bu = Backup.create(data, common.getPad, privateData.fileHost, function(blob, errors) {
|
||||
saveAs(blob, filename);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user