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

pull/1/head
yflory 5 years ago
commit 72e0abfbaa

@ -2,7 +2,7 @@
Cryptpad includes support for building a Docker image and running it to provide a Cryptpad instance. You can manage the container manually, or let Docker Compose manage it for you. Cryptpad includes support for building a Docker image and running it to provide a Cryptpad instance. You can manage the container manually, or let Docker Compose manage it for you.
A full tutorial is available [on the Cryptpad Github wiki](https://github.com/xwiki-labs/cryptpad/wiki/Docker-(with-Nginx-and-Traefik)). This document provides a brief overview. A full tutorial is available [on the Cryptpad Github wiki](https://github.com/xwiki-labs/cryptpad/wiki/Docker). This document provides a brief overview.
## Features ## Features

@ -20,11 +20,11 @@ define([
} }
profile.edit = Hash.getEditHashFromKeys(secret); profile.edit = Hash.getEditHashFromKeys(secret);
profile.view = Hash.getViewHashFromKeys(secret); profile.view = Hash.getViewHashFromKeys(secret);
cb(); setTimeout(cb);
}); });
return; return;
} }
cb(); setTimeout(cb);
}; };
var openChannel = function (ctx) { var openChannel = function (ctx) {

@ -21,7 +21,8 @@ define([
// No version: visible edit // No version: visible edit
// Version 2: encrypted edit links // Version 2: encrypted edit links
SF.checkMigration = function (secondaryKey, proxy, uo, cb) { SF.checkMigration = function (secondaryKey, proxy, uo, _cb) {
var cb = Util.once(Util.mkAsync(_cb));
var drive = proxy.drive || proxy; var drive = proxy.drive || proxy;
// View access: can't migrate // View access: can't migrate
if (!secondaryKey) { return void cb(); } if (!secondaryKey) { return void cb(); }
@ -309,7 +310,9 @@ define([
isNewChannel: Store.isNewChannel isNewChannel: Store.isNewChannel
}, id, sf, waitFor()); }, id, sf, waitFor());
}); });
}).nThen(waitFor()); }).nThen(function () {
setTimeout(waitFor());
});
}; };
return SF; return SF;

@ -25,10 +25,6 @@ define([
var Nacl = window.nacl; var Nacl = window.nacl;
var initializeTeams = function (ctx, cb) {
cb();
};
var registerChangeEvents = function (ctx, team, proxy, fId) { var registerChangeEvents = function (ctx, team, proxy, fId) {
if (!team) { return; } if (!team) { return; }
if (!fId) { if (!fId) {
@ -340,7 +336,7 @@ define([
}; };
var openChannel = function (ctx, teamData, id, _cb) { var openChannel = function (ctx, teamData, id, _cb) {
var cb = Util.once(_cb); var cb = Util.once(Util.mkAsync(_cb));
var hash = teamData.hash || teamData.roHash; var hash = teamData.hash || teamData.roHash;
var secret = Hash.getSecrets('team', hash, teamData.password); var secret = Hash.getSecrets('team', hash, teamData.password);
@ -1279,10 +1275,6 @@ define([
var teams = store.proxy.teams = store.proxy.teams || {}; var teams = store.proxy.teams = store.proxy.teams || {};
initializeTeams(ctx, waitFor(function (err) {
if (err) { return; }
}));
// Listen for changes in our access rights (if another worker receives edit access) // Listen for changes in our access rights (if another worker receives edit access)
ctx.store.proxy.on('change', ['teams'], function (o, n, p) { ctx.store.proxy.on('change', ['teams'], function (o, n, p) {
if (p[2] !== 'hash') { return; } if (p[2] !== 'hash') { return; }

@ -45,6 +45,8 @@ define([
var ids = id ? [id] : exp.findChannels([channel]); var ids = id ? [id] : exp.findChannels([channel]);
ids.forEach(function (i) { ids.forEach(function (i) {
var data = exp.getFileData(i, true); var data = exp.getFileData(i, true);
var oldHref = exp.getHref(data);
if (oldHref === href) { return; }
data.href = exp.cryptor.encrypt(href); data.href = exp.cryptor.encrypt(href);
}); });
}; };

Loading…
Cancel
Save