From 66392491b54a74ca449f291a990cce19016d8631 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Thu, 5 Jul 2018 13:17:33 +0200 Subject: [PATCH] Fix issue on signed out site. --- assets/js/pages/groups/main.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/assets/js/pages/groups/main.js b/assets/js/pages/groups/main.js index c4c2bd4d..dee13698 100644 --- a/assets/js/pages/groups/main.js +++ b/assets/js/pages/groups/main.js @@ -30,12 +30,14 @@ ComunicWeb.pages.groups.main = { } //Check if the main page has to be opened - if(page == "main" && signed_in()){ + if(page == "main"){ + if(!signed_in()) openPage("login"); return ComunicWeb.pages.groups.pages.main.open(target); } //Check if the page to create a group has to be opened - else if (page == "create" && signed_in()){ + else if (page == "create"){ + if(!signed_in()) openPage("login"); return ComunicWeb.pages.groups.pages.create.open(target); }