PMCORE-3332 Error message when consulting information about the cases (related to case notes)
This commit is contained in:
@@ -2076,7 +2076,7 @@ class Cases
|
||||
$respView = $case->getAllObjectsFrom($proUid, $appUid, $tasUid, $usrUid, 'VIEW');
|
||||
$respBlock = $case->getAllObjectsFrom($proUid, $appUid, $tasUid, $usrUid, 'BLOCK');
|
||||
if ($respView['CASES_NOTES'] == 0 && $respBlock['CASES_NOTES'] == 0) {
|
||||
throw new Exception(G::LoadTranslation("ID_CASES_NOTES_NO_PERMISSIONS"));
|
||||
throw new Exception(G::LoadTranslation("ID_THIS_USER_DOESNT_HAVE_PERMISSIONS_TO_SEE_CASE_NOTES"));
|
||||
}
|
||||
// Get the notes
|
||||
$appNote = new Notes();
|
||||
|
||||
@@ -1184,7 +1184,7 @@ class Cases extends Api
|
||||
|
||||
return DateTime::convertUtcToIso8601($response, $this->arrayFieldIso8601);
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
throw new RestException(401, $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user