Fixes for inconsistencies in documentation and permissions for some functions in the non-agent API
git-svn-id: svn://192.168.202.10@3854 3d104415-ff17-0410-8863-d5cf3c621b8a
This commit is contained in:
@@ -212,10 +212,11 @@
|
||||
# 240302-0804 - Added delete_dnc_phone function
|
||||
# 240420-2236 - Added ConfBridge code
|
||||
# 240703-1657 - Added update_remote_agent function
|
||||
# 240718-0942 - Fixes for inconsistencies in documentation and permissions for some functions
|
||||
#
|
||||
|
||||
$version = '2.14-189';
|
||||
$build = '240703-1657';
|
||||
$version = '2.14-190';
|
||||
$build = '240718-0942';
|
||||
$php_script='non_agent_api.php';
|
||||
$api_url_log = 0;
|
||||
$camp_lead_order_random=1;
|
||||
@@ -2719,7 +2720,7 @@ if ($function == 'agent_campaigns')
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
exit;
|
||||
}
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and view_reports='1' and user_level > 6 and active='Y';";
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and view_reports='1' and user_level > 7 and modify_users='1' and active='Y';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$allowed_user=$row[0];
|
||||
@@ -2734,7 +2735,7 @@ if ($function == 'agent_campaigns')
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt="SELECT user_level,user_group from vicidial_users where user='$user' and vdc_agent_api_access='1' and modify_users='1' and user_level >= 8;";
|
||||
$stmt="SELECT user_level,user_group from vicidial_users where user='$user' and vdc_agent_api_access='1' and user_level >= 8;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$user_level = $row[0];
|
||||
@@ -2906,7 +2907,7 @@ if ($function == 'campaigns_list')
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
exit;
|
||||
}
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and view_reports='1' and user_level > 6 and active='Y';";
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and view_reports='1' and user_level > 7 and active='Y';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$allowed_user=$row[0];
|
||||
@@ -2921,7 +2922,7 @@ if ($function == 'campaigns_list')
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt="SELECT user_level,user_group from vicidial_users where user='$user' and vdc_agent_api_access='1' and modify_users='1' and user_level >= 8;";
|
||||
$stmt="SELECT user_level,user_group from vicidial_users where user='$user' and vdc_agent_api_access='1' and user_level >= 8;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$user_level = $row[0];
|
||||
@@ -3037,7 +3038,7 @@ if ($function == 'hopper_list')
|
||||
api_log($link,$api_logging,$api_script,$user,$agent_user,$function,$value,$result,$result_reason,$source,$data);
|
||||
exit;
|
||||
}
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and view_reports='1' and user_level > 6 and active='Y';";
|
||||
$stmt="SELECT count(*) from vicidial_users where user='$user' and vdc_agent_api_access='1' and view_reports='1' and user_level > 7 and active='Y';";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$allowed_user=$row[0];
|
||||
@@ -3052,7 +3053,7 @@ if ($function == 'hopper_list')
|
||||
}
|
||||
else
|
||||
{
|
||||
$stmt="SELECT user_level,user_group from vicidial_users where user='$user' and vdc_agent_api_access='1' and modify_users='1' and user_level >= 8;";
|
||||
$stmt="SELECT user_level,user_group from vicidial_users where user='$user' and vdc_agent_api_access='1' and user_level >= 8;";
|
||||
$rslt=mysql_to_mysqli($stmt, $link);
|
||||
$row=mysqli_fetch_row($rslt);
|
||||
$user_level = $row[0];
|
||||
|
||||
Reference in New Issue
Block a user