Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
commit
f472bc9b6c
@ -72,7 +72,7 @@ define([
|
|||||||
])
|
])
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
h('div.cp-version-footer', "CryptPad v1.27.0 (null)")
|
h('div.cp-version-footer', "CryptPad v1.28.0 (toString)")
|
||||||
]);
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "cryptpad",
|
"name": "cryptpad",
|
||||||
"description": "realtime collaborative visual editor with zero knowlege server",
|
"description": "realtime collaborative visual editor with zero knowlege server",
|
||||||
"version": "1.27.0",
|
"version": "1.28.0",
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"chainpad-server": "^2.0.0",
|
"chainpad-server": "^2.0.0",
|
||||||
@ -11,6 +11,7 @@
|
|||||||
"pull-stream": "^3.6.1",
|
"pull-stream": "^3.6.1",
|
||||||
"replify": "^1.2.0",
|
"replify": "^1.2.0",
|
||||||
"saferphore": "0.0.1",
|
"saferphore": "0.0.1",
|
||||||
|
"sortify": "^1.0.4",
|
||||||
"stream-to-pull-stream": "^1.7.2",
|
"stream-to-pull-stream": "^1.7.2",
|
||||||
"tweetnacl": "~0.12.2",
|
"tweetnacl": "~0.12.2",
|
||||||
"ws": "^1.0.1"
|
"ws": "^1.0.1"
|
||||||
|
|||||||
19
rpc.js
19
rpc.js
@ -837,6 +837,17 @@ var removeOwnedChannel = function (Env, channelId, unsafeKey, cb) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Users should be able to clear their own pin log with an authenticated RPC
|
||||||
|
*/
|
||||||
|
var removePins = function (Env, safeKey, cb) {
|
||||||
|
if (typeof(Env.pinStore.removeChannel) !== 'function') {
|
||||||
|
return void cb("E_NOT_IMPLEMENTED");
|
||||||
|
}
|
||||||
|
Env.pinStore.removeChannel(safeKey, function (err) {
|
||||||
|
cb(err);
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
var upload = function (Env, publicKey, content, cb) {
|
var upload = function (Env, publicKey, content, cb) {
|
||||||
var paths = Env.paths;
|
var paths = Env.paths;
|
||||||
var dec;
|
var dec;
|
||||||
@ -1043,7 +1054,7 @@ var owned_upload_complete = function (Env, safeKey, cb) {
|
|||||||
Mkdirp(plannedPath, w(function (e /*, path */) {
|
Mkdirp(plannedPath, w(function (e /*, path */) {
|
||||||
if (e) { // does not throw error if the directory already existed
|
if (e) { // does not throw error if the directory already existed
|
||||||
w.abort();
|
w.abort();
|
||||||
return void cb(e); // XXX do we export Errors or strings?
|
return void cb(e);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
}).nThen(function (w) {
|
}).nThen(function (w) {
|
||||||
@ -1153,6 +1164,7 @@ var isAuthenticatedCall = function (call) {
|
|||||||
'EXPIRE_SESSION',
|
'EXPIRE_SESSION',
|
||||||
'CLEAR_OWNED_CHANNEL',
|
'CLEAR_OWNED_CHANNEL',
|
||||||
'REMOVE_OWNED_CHANNEL',
|
'REMOVE_OWNED_CHANNEL',
|
||||||
|
'REMOVE_PINS',
|
||||||
].indexOf(call) !== -1;
|
].indexOf(call) !== -1;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -1445,6 +1457,11 @@ RPC.create = function (
|
|||||||
if (e) { return void Respond(e); }
|
if (e) { return void Respond(e); }
|
||||||
Respond(void 0, "OK");
|
Respond(void 0, "OK");
|
||||||
});
|
});
|
||||||
|
case 'REMOVE_PINS':
|
||||||
|
return void removePins(Env, safeKey, function (e, response) {
|
||||||
|
if (e) { return void Respond(e); }
|
||||||
|
Respond(void 0, response);
|
||||||
|
});
|
||||||
// restricted to privileged users...
|
// restricted to privileged users...
|
||||||
case 'UPLOAD':
|
case 'UPLOAD':
|
||||||
if (!privileged) { return deny(); }
|
if (!privileged) { return deny(); }
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user