[Vtigercrm-commits] [vtiger-commits] r5603 - /vtigercrm/trunk/include/utils/CommonUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sun Apr 30 08:39:46 EDT 2006
Author: don
Date: Sun Apr 30 06:39:40 2006
New Revision: 5603
Log:
Added Security to HomPage UI
Modified:
vtigercrm/trunk/include/utils/CommonUtils.php
Modified: vtigercrm/trunk/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/trunk/include/utils/CommonUtils.php (original)
+++ vtigercrm/trunk/include/utils/CommonUtils.php Sun Apr 30 06:39:40 2006
@@ -715,6 +715,7 @@
function getDisplayCurrency()
{
global $log;
+ global $adb;
$log->debug("Entering getDisplayCurrency() method ...");
$curr_array = Array();
$sql1 = "select * from currency_info where currency_status='Active'";
@@ -2098,21 +2099,36 @@
$log->debug("Exiting getEntityName method ...");
}
+
function getAllParenttabmoduleslist()
{
global $adb;
+ global $current_user;
$resultant_array = Array();
- $query = 'select name,tablabel,parenttab_label from parenttabrel inner join tab on parenttabrel.tabid = tab.tabid in
-ner join parenttab on parenttabrel.parenttabid = parenttab.parenttabid order by parenttab.sequence';
+ $query = 'select name,tablabel,parenttab_label,tab.tabid from parenttabrel inner join tab on parenttabrel.tabid = tab.tabid inner join parenttab on parenttabrel.parenttabid = parenttab.parenttabid order by parenttab.sequence';
$result = $adb->query($query);
+ require('user_privileges/user_privileges_'.$current_user->id.'.php');
for($i=0;$i<$adb->num_rows($result);$i++)
{
$parenttabname = $adb->query_result($result,$i,'parenttab_label');
$modulename = $adb->query_result($result,$i,'name');
$tablabel = $adb->query_result($result,$i,'tablabel');
- $resultant_array[$parenttabname][] = Array($modulename,$tablabel);
+ $tabid = $adb->query_result($result,$i,'tabid');
+ if($is_admin)
+ {
+ $resultant_array[$parenttabname][] = Array($modulename,$tablabel);
+ }
+ elseif($profileGlobalPermission[2]==0 || $profileGlobalPermission[1]==0 || $profileTabsPermission[$tabid]==0) {
+ $resultant_array[$parenttabname][] = Array($modulename,$tablabel);
+ }
}
- return $resultant_array;
+
+ if($is_admin)
+ {
+ $resultant_array['Settings'][] = Array('Settings','Settings');
+ }
+
+ return $resultant_array;
}
More information about the vtigercrm-commits
mailing list