[Vtigercrm-commits] [vtiger-commits] r5394 - /vtigercrm/trunk/include/utils/CommonUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Wed Apr 26 10:17:18 EDT 2006


Author: saraj
Date: Wed Apr 26 08:17:14 2006
New Revision: 5394

Log:
Added a function Button_Check for security check of button in List/Detail/Edit View of all Modules - Ahmed

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 Wed Apr 26 08:17:14 2006
@@ -1674,4 +1674,28 @@
 	$change_owner = get_select_options_with_id($usernamelist,'admin');
 	return $change_owner;
 }
+
+
+/**
+  *	Function to Check for Security whether the Buttons are permitted in List/Edit/Detail View of all Modules
+  *	@param string $module -- module name
+  *	Returns an array with permission as Yes or No
+**/
+function Button_Check($module)
+{
+        $permit_arr = array ('EditView' => '',
+                             'index' => '',
+                             'Import' => '',
+                             'Export' => '' );
+
+          foreach($permit_arr as $action => $perr)
+          {
+                 $tempPer=isPermitted($module,$action,'');
+                 $permit_arr[$action] = $tempPer;
+          }
+
+	  return $permit_arr;
+
+}
+
 ?>





More information about the vtigercrm-commits mailing list