From 981d2a2887461e1d38478aec5609639f2281ea90 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Wed, 15 Mar 2017 12:34:38 +0100
Subject: [PATCH] navigation bar items require a login; update login page

---
 public_html/deployment/inc_functions.php   | 2 +-
 public_html/deployment/pages/act_login.php | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/public_html/deployment/inc_functions.php b/public_html/deployment/inc_functions.php
index d3e15460..588e28f1 100644
--- a/public_html/deployment/inc_functions.php
+++ b/public_html/deployment/inc_functions.php
@@ -195,7 +195,7 @@ function getTopArea() {
             <!-- Collect the nav links, forms, and other content for toggling -->
             <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
             ';
-    if($oUser->getUsername() || true ){
+    if($oUser->getUsername()){
         $sReturn.='
               <ul class="nav navbar-nav">
               
diff --git a/public_html/deployment/pages/act_login.php b/public_html/deployment/pages/act_login.php
index 376c1a32..39e79dda 100644
--- a/public_html/deployment/pages/act_login.php
+++ b/public_html/deployment/pages/act_login.php
@@ -53,10 +53,11 @@ if ($oUser->getUsername()) {
                 . '<strong>' . $oUser->getUsername() . '</strong><br><br>'
                 . t("page-login-usergroups") . '<br>'
                 . '<ul>'.$sGrouplist . '</ul><br>'
-                . '<pre style="float: left; margin-right: 1em;">roles:<br>' . print_r($oUser->getUserPermission(), true) . '</pre>'
                 . '<div style="clear: both; margin-bottom: 1em;"></div>'
-                . '<a href="?logoff=1" class="btn btn-default"><span class="glyphicon glyphicon-off"></span> ' . t('logoff') . '</a>'
-                // . ' ' . aPrjHome() . ''
+                . ' ' . aPrjHome() . ' '
+                . '<a href="?logoff=1" class="btn btn-default btn-danger"><span class="glyphicon glyphicon-off"></span> ' . t('logoff') . '</a>'
+            
+                . '<br><br>INFO: <pre style="">roles:<br>' . print_r($oUser->getUserPermission(), true) . '</pre>'
             . '</p>'
             . '</div>';
 } else {
-- 
GitLab