HOR-1877
HOR-1877 HOR-1877 HOR-1877
This commit is contained in:
@@ -686,6 +686,7 @@ class pmDynaform
|
||||
window.dynaform = new PMDynaform.core.Project({
|
||||
data: data,
|
||||
delIndex: delIndex,
|
||||
dynaformUid: dyn_uid,
|
||||
keys: {
|
||||
server: httpServerHostname,
|
||||
projectId: prj_uid,
|
||||
@@ -744,6 +745,7 @@ class pmDynaform
|
||||
" window.dynaform = new PMDynaform.core.Project({\n" .
|
||||
" data: data,\n" .
|
||||
" delIndex: delIndex,\n" .
|
||||
" dynaformUid: dyn_uid,\n" .
|
||||
" keys: {\n" .
|
||||
" server: httpServerHostname,\n" .
|
||||
" projectId: prj_uid,\n" .
|
||||
|
||||
@@ -38,7 +38,19 @@ class Cases extends Api
|
||||
case 'doGetCaseVariables':
|
||||
$applicationUid = $this->parameters[$arrayArgs['app_uid']];
|
||||
$dynaformUid = $this->parameters[$arrayArgs['dyn_uid']];
|
||||
$delIndex = $this->parameters[$arrayArgs['app_index']];
|
||||
$userUid = $this->getUserId();
|
||||
//Check if the user has the case
|
||||
$appDelegation = new \AppDelegation();
|
||||
$aCurUser = $appDelegation->getCurrentUsers($applicationUid, $delIndex);
|
||||
if (!empty($aCurUser)) {
|
||||
foreach ($aCurUser as $key => $value) {
|
||||
if ($value === $userUid) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
//Check if the user has Permissions
|
||||
$oCases = new \ProcessMaker\BusinessModel\Cases();
|
||||
return $oCases->checkUserHasPermissionsOrSupervisor($userUid, $applicationUid, $dynaformUid);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user