PM-3888-C
This commit is contained in:
@@ -94,12 +94,6 @@ class Cases
|
||||
Validator::usrUid($dataList["userId"], "userId");
|
||||
}
|
||||
|
||||
$user = new \ProcessMaker\BusinessModel\User();
|
||||
|
||||
if (!$user->checkPermission($dataList["userId"], "PM_ALLCASES")) {
|
||||
throw new \Exception(\G::LoadTranslation("ID_CASE_USER_NOT_HAVE_PERMISSION", array($dataList["userId"])));
|
||||
}
|
||||
|
||||
G::LoadClass("applications");
|
||||
$solrEnabled = false;
|
||||
$userUid = $dataList["userId"];
|
||||
@@ -121,6 +115,12 @@ class Cases
|
||||
$dateTo = (!empty( $dataList["dateTo"] )) ? substr( $dataList["dateTo"], 0, 10 ) : "";
|
||||
$first = isset( $dataList["first"] ) ? true :false;
|
||||
|
||||
$u = new \ProcessMaker\BusinessModel\User();
|
||||
|
||||
if ($action == "search" && !$u->checkPermission($dataList["userId"], "PM_ALLCASES")) {
|
||||
throw new \Exception(\G::LoadTranslation("ID_CASE_USER_NOT_HAVE_PERMISSION", array($dataList["userId"])));
|
||||
}
|
||||
|
||||
$valuesCorrect = array('todo', 'draft', 'paused', 'sent', 'selfservice', 'unassigned', 'search');
|
||||
if (!in_array($action, $valuesCorrect)) {
|
||||
throw (new \Exception(\G::LoadTranslation("ID_INCORRECT_VALUE_ACTION")));
|
||||
@@ -2289,4 +2289,3 @@ class Cases
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user