[Vtigercrm-commits] [vtiger-commits] r4844 - /vtigercrm/trunk/include/utils/UserInfoUtil.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Apr 3 14:28:48 EDT 2006
Author: don
Date: Mon Apr 3 12:28:44 2006
New Revision: 4844
Log:
Added function getPermittedModuleNames
Modified:
vtigercrm/trunk/include/utils/UserInfoUtil.php
Modified: vtigercrm/trunk/include/utils/UserInfoUtil.php
==============================================================================
--- vtigercrm/trunk/include/utils/UserInfoUtil.php (original)
+++ vtigercrm/trunk/include/utils/UserInfoUtil.php Mon Apr 3 12:28:44 2006
@@ -4034,4 +4034,42 @@
return $fldModArr;
}
+/** Function to get the permitted module name Array with presence as 0
+ * @returns permitted module name Array :: Type Array
+ *
+ */
+function getPermittedModuleNames()
+{
+ global $current_user;
+ $permittedModules=Array();
+ require('user_privileges/user_privileges_'.$current_user->id.'.php');
+ include('tabdata.php');
+
+ if($is_admin == false && $profileGlobalPermission[1] == 1 && $profileGlobalPermission[2] == 1)
+ {
+ foreach($tab_seq_array as $tabid=>$seq_value)
+ {
+ if($seq_value ==0 && $profileTabsPermission[$tabid] == 0)
+ {
+ $permittedModules[]=getTabModuleName($tabid);
+ }
+
+ }
+
+
+ }
+ else
+ {
+ foreach($tab_seq_array as $tabid=>$seq_value)
+ {
+ if($seq_value ==0)
+ {
+ $permittedModules[]=getTabModuleName($tabid);
+ }
+
+ }
+ }
+ return $permittedModules;
+}
+
?>
More information about the vtigercrm-commits
mailing list