Redirect to drive anonymous users trying to create a profile

pull/1/head
yflory 7 years ago
parent caf86dd9b7
commit 1f3f4941b5

@ -53,7 +53,11 @@ define([
return void cb(null, Hash.getSecrets('profile', editHash));
}
// 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 secret = Hash.getSecrets('profile', hash);
Cryptpad.pinPads([secret.channel], function (e) {

Loading…
Cancel
Save