From 1f3f4941b5c407faabded279457275cd4ac6f2b2 Mon Sep 17 00:00:00 2001 From: yflory Date: Wed, 18 Apr 2018 18:53:36 +0200 Subject: [PATCH] Redirect to drive anonymous users trying to create a profile --- www/profile/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/www/profile/main.js b/www/profile/main.js index 2449ea96b..c4b3847a4 100644 --- a/www/profile/main.js +++ b/www/profile/main.js @@ -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) {