From 19576cebed277f7abfe86c5ed172c433d204d088 Mon Sep 17 00:00:00 2001 From: Pierre Date: Wed, 16 May 2018 06:40:26 +0200 Subject: [PATCH] Conversations page need login --- assets/js/common/page.js | 6 ++++++ assets/js/pagesList.js | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/assets/js/common/page.js b/assets/js/common/page.js index 4b5a5fb5..d3863b0d 100644 --- a/assets/js/common/page.js +++ b/assets/js/common/page.js @@ -198,6 +198,12 @@ ComunicWeb.common.page = { var mainContainerElem = this.emptyPage(true); } + //Check if the page requires user login + if(pageInfos.needLogin){ + if(!signed_in()) + openPage("login"); + } + //We check if the page is a full screen page or not if(pageInfos.disableMenus){ //We force the screen to be cleaned diff --git a/assets/js/pagesList.js b/assets/js/pagesList.js index 314815c7..126012f2 100644 --- a/assets/js/pagesList.js +++ b/assets/js/pagesList.js @@ -47,7 +47,8 @@ ComunicWeb.pagesList = { conversations: { pageTitle: "Conversations", methodHandler: "ComunicWeb.pages.conversations.main.open", - disableMenus: false + disableMenus: false, + needLogin: true }, /**