[Vtigercrm-commits] [vtiger-commits] r5449 - in /vtigercrm/trunk/modules/Leads: DetailView.php ListView.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Thu Apr 27 04:08:13 EDT 2006


Author: saraj
Date: Thu Apr 27 02:08:07 2006
New Revision: 5449

Log:
Added the Security Check for Buttons in List/Detail View of Leads Module - Ahmed

Modified:
    vtigercrm/trunk/modules/Leads/DetailView.php
    vtigercrm/trunk/modules/Leads/ListView.php

Modified: vtigercrm/trunk/modules/Leads/DetailView.php
==============================================================================
--- vtigercrm/trunk/modules/Leads/DetailView.php (original)
+++ vtigercrm/trunk/modules/Leads/DetailView.php Thu Apr 27 02:08:07 2006
@@ -66,9 +66,9 @@
 $smarty->assign("CUSTOMFIELD", $cust_fld);
 
 
-$val = isPermitted("Leads",1,$_REQUEST['record']);
+$val = isPermitted("Leads","EditView",$_REQUEST['record']);
 
-if(isPermitted("Leads",1,$_REQUEST['record']) == 'yes')
+if(isPermitted("Leads","EditView",$_REQUEST['record']) == 'yes')
 	$smarty->assign("EDIT_DUPLICATE","permitted");
 
 
@@ -81,10 +81,10 @@
 $smarty->assign("CATEGORY",$category);
 
 
-if(isPermitted("Leads",2,$_REQUEST['record']) == 'yes')
+if(isPermitted("Leads","Delete",$_REQUEST['record']) == 'yes')
 	$smarty->assign("DELETE","permitted");
 
-if(isPermitted("Emails",1,'') == 'yes')
+if(isPermitted("Emails","EditView",'') == 'yes')
 {
 	//Added to pass the parents list as hidden for Emails -- 09-11-2005
 	$parent_email = getEmailParentsList('Leads',$_REQUEST['record']);
@@ -92,7 +92,7 @@
 	$smarty->assign("SENDMAILBUTTON","permitted");
 }
 
-if(isPermitted("Leads",8,'') == 'yes') 
+if(isPermitted("Leads","Merge",'') == 'yes') 
 {
 	$smarty->assign("MERGEBUTTON","permitted");
 	$wordTemplateResult = fetchWordTemplateList("Leads");

Modified: vtigercrm/trunk/modules/Leads/ListView.php
==============================================================================
--- vtigercrm/trunk/modules/Leads/ListView.php (original)
+++ vtigercrm/trunk/modules/Leads/ListView.php Thu Apr 27 02:08:07 2006
@@ -87,14 +87,15 @@
 // Buttons and View options
 //Modified by Raju
 //raju
-if(isPermitted('Leads',2,'') == 'yes')
+if(isPermitted('Leads','Delete','') == 'yes')
 {
 	$other_text['del'] =	$app_strings[LBL_MASS_DELETE];	
 
 }
-$other_text['s_mail'] = $app_strings[LBL_SEND_MAIL_BUTTON];
-
-if(isPermitted('Leads',1,'') == 'yes')
+if(isPermitted('Emails','EditView','') == 'yes')
+	$other_text['s_mail'] = $app_strings[LBL_SEND_MAIL_BUTTON];
+
+if(isPermitted('Leads','EditView','') == 'yes')
 {
 	$other_text['c_owner'] = $app_strings[LBL_CHANGE_OWNER];
 	$other_text['c_status'] = $app_strings[LBL_CHANGE_STATUS];





More information about the vtigercrm-commits mailing list