Merged in feature/PMCORE-4079 (pull request #8654)
PMCORE-4079 Approved-by: Julio Cesar Laura Avendaño
This commit is contained in:
@@ -3007,11 +3007,14 @@ class WsBase
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!in_array($userIdTarget, $userList)) {
|
if (!in_array($userIdTarget, $userList)) {
|
||||||
$result = new WsResponse(34, G::loadTranslation('ID_TARGET_USER_DOES_NOT_HAVE_RIGHTS'));
|
$bmCase = new BmCases();
|
||||||
|
if (!$bmCase->isSupervisor($userIdTarget, $rows['APP_NUMBER'])){
|
||||||
|
$result = new WsResponse(34, G::loadTranslation('ID_TARGET_USER_DOES_NOT_HAVE_RIGHTS'));
|
||||||
|
|
||||||
$g->sessionVarRestore();
|
$g->sessionVarRestore();
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1162,16 +1162,17 @@ class Cases
|
|||||||
$appDelegation = new AppDelegation();
|
$appDelegation = new AppDelegation();
|
||||||
$delegation = $appDelegation->load($appUid, $index);
|
$delegation = $appDelegation->load($appUid, $index);
|
||||||
if (empty($delegation['USR_UID'])) {
|
if (empty($delegation['USR_UID'])) {
|
||||||
$case = new ClassesCases();
|
$classesCase = new ClassesCases();
|
||||||
$case->loadCase($appUid);
|
$case = $classesCase->loadCase($appUid);
|
||||||
|
|
||||||
//Review if the user can be claim the case
|
//Review if the user can be claim the case
|
||||||
if (!$case->isSelfService($userUid, $delegation['TAS_UID'], $appUid)) {
|
if (!$classesCase->isSelfService($userUid, $delegation['TAS_UID'], $appUid)) {
|
||||||
$message = preg_replace("#<br\s*/?>#i", "", G::LoadTranslation("ID_NO_PERMISSION_NO_PARTICIPATED"));
|
if (!$this->isSupervisor($userUid, $case['APP_NUMBER'])){
|
||||||
throw new Exception($message);
|
$message = preg_replace("#<br\s*/?>#i", "", G::LoadTranslation("ID_NO_PERMISSION_NO_PARTICIPATED"));
|
||||||
|
throw new Exception($message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
$classesCase->setCatchUser($appUid, $index, $userUid);
|
||||||
$case->setCatchUser($appUid, $index, $userUid);
|
|
||||||
} else {
|
} else {
|
||||||
throw new Exception(G::LoadTranslation("ID_CASE_USER_INVALID_CLAIM_CASE", [$userUid]));
|
throw new Exception(G::LoadTranslation("ID_CASE_USER_INVALID_CLAIM_CASE", [$userUid]));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user