Prevent users from creating a pad when visiting a deleted profile (read-only mode)

This commit is contained in:
yflory
2018-04-18 18:54:46 +02:00
parent a0d452bbd9
commit 206ac14438
5 changed files with 20 additions and 0 deletions

View File

@@ -650,6 +650,12 @@ define([
Cryptpad.getMetadata(waitFor(function (err, m) {
cpNfCfg.owners = [m.priv.edPublic];
}));
} else if (isNewFile && !cfg.useCreationScreen && window.location.hash) {
console.log("new file with hash in the address bar in an app without pcs and which requires owners");
sframeChan.onReady(function () {
sframeChan.query("EV_LOADING_ERROR", "DELETED");
});
waitFor.abort();
}
}).nThen(function () {
Object.keys(rtConfig).forEach(function (k) {