[Vtigercrm-commits] [vtiger-commits] r10412 - /vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon Mar 12 11:17:34 EDT 2007
Author: saraj
Date: Mon Mar 12 09:17:26 2007
New Revision: 10412
Log:
non admin user unable to select users during mail compose - fixed. Fixes #3195
Modified:
vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php
Modified: vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php Mon Mar 12 09:17:26 2007
@@ -253,7 +253,7 @@
$j++;
}
$field_list .=')';
- if($is_admin==false)
+ if($is_admin==false || $module != 'Users')
{
$profileList = getCurrentUserProfileList();
$query = "SELECT DISTINCT vtiger_field.fieldname
@@ -284,7 +284,7 @@
global $current_user;
require('user_privileges/user_privileges_'.$current_user->id.'.php');
- if($is_admin==false)
+ /* if($is_admin==false)
{
$profileList = getCurrentUserProfileList();
$query = "SELECT vtiger_profile2field.*
@@ -300,9 +300,9 @@
AND vtiger_field.fieldname = '".$fieldname."'";
$result = $adb->query($query);
- }
-
- if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] ==0 || $adb->num_rows($result) == 1)
+ }*/
+
+ if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] ==0 || in_array($fieldname,$field) || $module == 'Users')
{
if(isset($focus->sortby_fields) && $focus->sortby_fields !='')
@@ -824,7 +824,8 @@
$j++;
}
$field_list .=')';
- if($is_admin==false)
+
+ if($is_admin==false || $module != 'Users')
{
$profileList = getCurrentUserProfileList();
$query = "SELECT DISTINCT vtiger_field.fieldname
@@ -839,6 +840,7 @@
AND vtiger_profile2field.profileid IN ".$profileList."
AND vtiger_field.fieldname IN ".$field_list;
$result = $adb->query($query);
+
$field=Array();
for($k=0;$k < $adb->num_rows($result);$k++)
{
@@ -884,7 +886,9 @@
{
$fieldname = $focus->search_fields_name[$name];
- if($is_admin==false)
+ /*
+
+ if($is_admin==false && $module != 'Users')
{
$profileList = getCurrentUserProfileList();
$query = "SELECT vtiger_profile2field.*
@@ -901,8 +905,8 @@
$result = $adb->query($query);
}
-
- if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] ==0 || $adb->num_rows($result) == 1)
+ */
+ if($is_admin == true || $profileGlobalPermission[1] == 0 || $profileGlobalPermission[2] ==0 || in_array($fieldname,$field) || $module == 'Users')
{
if($fieldname == '')
{
More information about the vtigercrm-commits
mailing list