Merge branch 'soon' of github.com:xwiki-labs/cryptpad into soon

This commit is contained in:
yflory
2019-11-18 14:57:12 +01:00
12 changed files with 119 additions and 15 deletions

View File

@@ -1035,6 +1035,10 @@ define([
team.userObject.setReadOnly(!secret.keys.secondaryKey, secret.keys.secondaryKey);
}
if (!secret.keys.secondaryKey && team.rpc) {
team.rpc.destroy();
}
// Upgrade the shared folders
var folders = Util.find(team, ['proxy', 'drive', 'sharedFolders']);
Object.keys(folders || {}).forEach(function (sfId) {

View File

@@ -115,9 +115,13 @@ define([
};
exp.deprecateSharedFolder = function (id) {
if (readOnly) { return; }
var data = files[SHARED_FOLDERS][id];
if (!data) { return; }
files[SHARED_FOLDERS_TEMP][id] = JSON.parse(JSON.stringify(data));
var ro = !data.href || exp.cryptor.decrypt(data.href).indexOf('#') === -1;
if (!ro) {
files[SHARED_FOLDERS_TEMP][id] = JSON.parse(JSON.stringify(data));
}
var paths = exp.findFile(Number(id));
exp.delete(paths, null, true);
delete files[SHARED_FOLDERS][id];