[Vtigercrm-commits] [vtiger-commits] r10071 - /vtigercrm/branches/5.0.3/soap/thunderbirdplugin.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue Jan 16 08:33:55 EST 2007


Author: richie
Date: Tue Jan 16 06:33:52 2007
New Revision: 10071

Log:
Non admin lead check issue fixed

Modified:
    vtigercrm/branches/5.0.3/soap/thunderbirdplugin.php

Modified: vtigercrm/branches/5.0.3/soap/thunderbirdplugin.php
==============================================================================
--- vtigercrm/branches/5.0.3/soap/thunderbirdplugin.php (original)
+++ vtigercrm/branches/5.0.3/soap/thunderbirdplugin.php Tue Jan 16 06:33:52 2007
@@ -52,6 +52,9 @@
 
 $server->register(
     'CheckContactViewPerm',array('user_name'=>'xsd:string'),array('return'=>'xsd:string'),$NAMESPACE);
+
+$server->register(
+	'CheckLeadViewPerm',array('user_name'=>'xsd:string'),array('return'=>'xsd:string'),$NAMESPACE);
 
 $server->register(
 	  'AddContact',
@@ -543,6 +546,22 @@
 	}
 }
 
+function CheckLeadViewPerm($user_name)
+{
+  global $current_user,$log;
+	require_once('modules/Users/Users.php');
+	$seed_user = new Users();
+	$user_id = $seed_user->retrieve_user_id($user_name);
+	$current_user = $seed_user;
+	$current_user->retrieve_entity_info($user_id,"Users");
+	if(isPermitted("Leads","EditView") == "yes")
+	{
+		return "allowed";
+	}else
+	{
+		return "denied";
+	}
+}
 $server->service($HTTP_RAW_POST_DATA);
 exit();
 ?>





More information about the vtigercrm-commits mailing list