fmsystem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fmsystem-commits] [16117] check menuitems for access rights


From: sigurdne
Subject: [Fmsystem-commits] [16117] check menuitems for access rights
Date: Thu, 29 Dec 2016 10:59:34 +0000 (UTC)

Revision: 16117
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16117
Author:   sigurdne
Date:     2016-12-29 10:59:33 +0000 (Thu, 29 Dec 2016)
Log Message:
-----------
check menuitems for access rights

Modified Paths:
--------------
    trunk/phpgwapi/templates/mobilefrontend/navbar.inc.php

Modified: trunk/phpgwapi/templates/mobilefrontend/navbar.inc.php
===================================================================
--- trunk/phpgwapi/templates/mobilefrontend/navbar.inc.php      2016-12-29 
10:58:29 UTC (rev 16116)
+++ trunk/phpgwapi/templates/mobilefrontend/navbar.inc.php      2016-12-29 
10:59:33 UTC (rev 16117)
@@ -25,6 +25,9 @@
                $moveout_url = $GLOBALS['phpgw']->link('/index.php', 
array('menuaction' => 'rental.uimoveout.index'));
                $moveout_text = 
$GLOBALS['phpgw']->translation->translate('moveout', array(), false, 'rental');
 
+               $acl = & $GLOBALS['phpgw']->acl;
+
+
                $topmenu = <<<HTML
                <div class="pure-menu pure-menu-horizontal">
                        <ul class="pure-menu-list">
@@ -40,12 +43,29 @@
                                <li class="pure-menu-item">
                                        <a href="{$condition_survey_url}" 
class="pure-menu-link">{$condition_survey_text}</a>
                                </li>
+HTML;
+
+               if($acl->check('.movein', PHPGW_ACL_READ, 'rental'))
+               {
+                       $topmenu .= <<<HTML
                                <li class="pure-menu-item">
                                        <a href="{$movein_url}" 
class="pure-menu-link">{$movein_text}</a>
                                </li>
+HTML;
+
+               }
+               if($acl->check('.moveout', PHPGW_ACL_READ, 'rental'))
+               {
+                       $topmenu .= <<<HTML
                                <li class="pure-menu-item">
                                        <a href="{$moveout_url}" 
class="pure-menu-link">{$moveout_text}</a>
                                </li>
+HTML;
+
+               }
+
+
+               $topmenu .= <<<HTML
                        </ul>
                </div>
 HTML;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]