Open and Scrypt invitation link

This commit is contained in:
yflory
2019-12-13 17:03:24 +01:00
parent 9391698f54
commit be9dce674f
5 changed files with 143 additions and 7 deletions

View File

@@ -20,7 +20,7 @@ define(function() {
* users and these users will be redirected to the login page if they still try to access
* the app
*/
config.registeredOnlyTypes = ['teams', 'file', 'contacts', 'oodoc', 'ooslide', 'sheet', 'notifications'];
config.registeredOnlyTypes = ['file', 'contacts', 'oodoc', 'ooslide', 'sheet', 'notifications'];
/* CryptPad is available is multiple languages, but only English and French are maintained
* by the developers. The other languages may be outdated, and any missing string for a langauge

View File

@@ -1651,7 +1651,7 @@ define([
}),
h('br'),
linkMessage = h('textarea', {
placeholder: 'note...'
placeholder: 'note...' // XXX
})
]),
linkSpin = h('div', {
@@ -1677,7 +1677,6 @@ define([
var hash = Hash.createRandomHash('invite', pw);
var hashData = Hash.parseTypeHash('invite', hash);
href = origin + '/teams/#' + hash;
console.log(hashData);
if (!name || !name.trim()) {
$(linkError).text('empty name...').show(); // XXX
return true;
@@ -1707,7 +1706,7 @@ define([
password: pw,
message: msg,
bytes64: bytes64,
href: href,
hash: hash,
teamId: config.teamId,
}, waitFor(function (obj) {
if (obj && obj.error) {

View File

@@ -1267,7 +1267,7 @@ define([
var name = data.name;
var password = data.password;
var msg = data.message;
var href = data.href;
var hash = data.hash;
var bytes64 = data.bytes64;
*/
return void cb();
@@ -1277,6 +1277,20 @@ define([
});
*/
};
var getLinkData = function (ctx, data, cId, cb) {
/*
var password = data.password;
var hash = data.hash;
var bytes64 = data.bytes64;
*/
return void cb();
/*
cb({
error: 'NOT_IMPLEMENTED'
});
*/
};
Team.init = function (cfg, waitFor, emit) {
var team = {};
@@ -1434,6 +1448,9 @@ define([
if (cmd === 'CREATE_INVITE_LINK') {
return void createInviteLink(ctx, data, clientId, cb);
}
if (cmd === 'GET_LINK_DATA') {
return void getLinkData(ctx, data, clientId, cb);
}
};
return team;