Redirect to drive anonymous users trying to create a profile
This commit is contained in:
parent
caf86dd9b7
commit
1f3f4941b5
@ -53,7 +53,11 @@ define([
|
|||||||
return void cb(null, Hash.getSecrets('profile', editHash));
|
return void cb(null, Hash.getSecrets('profile', editHash));
|
||||||
}
|
}
|
||||||
// 3rd case: profile creation (create a new random hash, store it later if needed)
|
// 3rd case: profile creation (create a new random hash, store it later if needed)
|
||||||
if (!Utils.LocalStore.isLoggedIn()) { return void cb(); }
|
if (!Utils.LocalStore.isLoggedIn()) {
|
||||||
|
// Unregistered users can't create a profile
|
||||||
|
window.location.href = '/drive';
|
||||||
|
return void cb();
|
||||||
|
}
|
||||||
var hash = Hash.createRandomHash();
|
var hash = Hash.createRandomHash();
|
||||||
var secret = Hash.getSecrets('profile', hash);
|
var secret = Hash.getSecrets('profile', hash);
|
||||||
Cryptpad.pinPads([secret.channel], function (e) {
|
Cryptpad.pinPads([secret.channel], function (e) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user