Atucalizacion de rama

Former-commit-id: 0b31052bc4b69d12840b0bac70e06ff222142c07
This commit is contained in:
marcos.alconada 2019-04-17 15:06:25 +02:00
parent 5de38e204f
commit 51541c8d2c
2 changed files with 16 additions and 31 deletions

View File

@ -106,7 +106,7 @@ if ($correctLogin) {
}
} else {
$function_name = 'api_'.$op.'_'.$op2;
$id = 1;
if ($op == 'set' && $id) {
switch ($op2) {
case 'update_agent':
@ -151,6 +151,20 @@ if ($correctLogin) {
}
break;
case 'filter_user_group':
$id_os = api_set_filter_user_group($returnType, $user_db, $group_db, $disable);
if ($id_os != 100) {
return;
}
if ($id_os == 100) {
returnError('not_allowed_operation_cluster', $returnType);
return false;
}
break;
case 'info_user_name':
if ($user_db === '') {
@ -170,25 +184,6 @@ if ($correctLogin) {
}
break;
case 'filter_user_group':
if ($user_db === '' && ( $group_db === '' || $disable === '')) {
returnError(__('User, group or disabled status not specified'), __('User, group or disabled status not specified'));
return;
}
$id_os = api_set_filter_user_group($returnType, $user_db, $group_db, $disable);
if ($id_os != 100) {
return;
}
if ($id_os == false) {
returnError('not_allowed_operation_cluster', $returnType);
return false;
}
break;
case 'delete_user_profiles':
if ($user_db === '') {
@ -208,16 +203,6 @@ if ($correctLogin) {
}
break;
case 'list_all_user':
$id_os = api_set_list_all_user($returnType);
if ($id_os === false) {
returnError('not_allowed_operation_cluster', $returnType);
return false;
}
break;
case 'add_permission_user_to_group':
if ($user_db == null || $group_db == null || $id_up == null) {

View File

@ -14739,7 +14739,7 @@ function api_set_reset_agent_counts($id, $thrash1, $thrash2, $thrash3)
*/
function api_set_list_all_user($returnType)
function api_get_list_all_user($thrash1, $thrash2, $other, $returnType)
{
global $config;