HOR-1877

HOR-1877

HOR-1877
This commit is contained in:
Paula V. Quispe
2016-09-19 13:38:34 -04:00
parent f699892fa4
commit af491f6a53
2 changed files with 14 additions and 0 deletions

View File

@@ -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" .

View File

@@ -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;