PMCORE-3512 Any user can claim a case
This commit is contained in:
@@ -1134,6 +1134,13 @@ class Cases
|
|||||||
if (empty($delegation['USR_UID'])) {
|
if (empty($delegation['USR_UID'])) {
|
||||||
$case = new ClassesCases();
|
$case = new ClassesCases();
|
||||||
$case->loadCase($appUid);
|
$case->loadCase($appUid);
|
||||||
|
|
||||||
|
//Review if the user can be claim the case
|
||||||
|
if (!$case->isSelfService($userUid, $delegation['TAS_UID'], $appUid)) {
|
||||||
|
$message = preg_replace("#<br\s*/?>#i", "", G::LoadTranslation("ID_NO_PERMISSION_NO_PARTICIPATED"));
|
||||||
|
throw new Exception($message);
|
||||||
|
}
|
||||||
|
|
||||||
$case->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