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

pull/1/head
yflory 8 years ago
commit 38bd6b3808

@ -481,7 +481,7 @@ define(function () {
'# CryptPad\'s Zero Knowledge collaborative code editor\n', '# CryptPad\'s Zero Knowledge collaborative code editor\n',
'\n', '\n',
'* What you type here is encrypted so only people who have the link can access it.\n', '* What you type here is encrypted so only people who have the link can access it.\n',
'* You can choose the programming language to highlight and the UI color scheme in the upper right.' '* You can choose the programming language to highlight and the UI color scheme in the upper right.'
].join(''); ].join('');
out.slideInitialState = [ out.slideInitialState = [

@ -376,6 +376,11 @@ var updateLimits = function (config, publicKey, cb) {
var defaultLimit = typeof(config.defaultStorageLimit) === 'number'? var defaultLimit = typeof(config.defaultStorageLimit) === 'number'?
config.defaultStorageLimit: DEFAULT_LIMIT; config.defaultStorageLimit: DEFAULT_LIMIT;
var userId;
if (publicKey) {
userId = unescapeKeyCharacters(publicKey);
}
var body = JSON.stringify({ var body = JSON.stringify({
domain: config.domain, domain: config.domain,
subdomain: config.subdomain subdomain: config.subdomain
@ -404,8 +409,8 @@ var updateLimits = function (config, publicKey, cb) {
var json = JSON.parse(str); var json = JSON.parse(str);
limits = json; limits = json;
var l; var l;
if (publicKey) { if (userId) {
var limit = limits[publicKey]; var limit = limits[userId];
l = limit && typeof limit.limit === "number" ? l = limit && typeof limit.limit === "number" ?
[limit.limit, limit.plan, limit.note] : [defaultLimit, '', '']; [limit.limit, limit.plan, limit.note] : [defaultLimit, '', ''];
} }

Loading…
Cancel
Save