PMCORE-561

This commit is contained in:
Andrea Adamczyk
2020-09-08 16:20:28 -04:00
parent d60dbe1e37
commit fe49792fc0
11 changed files with 355 additions and 13 deletions

View File

@@ -1,5 +1,7 @@
<?php
use ProcessMaker\Model\Process;
try {
global $RBAC;
switch ($RBAC->userCanAccess('PM_LOGIN')) {
@@ -107,7 +109,15 @@ try {
$response .= '}';
echo $response;
break;
case 'privateProcesses':
$usrUid = $_POST['USR_UID'];
//Check if the user has private processes
$r = Process::getProcessPrivateListByUser($usrUid);
$response = json_encode(['success'=>true, 'publicProcesses'=>$r]);
echo $response;
break;
case 'deleteUser':
Process::convertPrivateProcessesToPublic(json_decode($_POST['private_processes']));
$usrUid = $_POST['USR_UID'];
//Check if the user was defined in a process permissions
$oObjectPermission = new ObjectPermission();