Merged in release/3.3.2 (pull request #6748)
update release/3.3.2 Approved-by: Paula Quispe <paula.quispe@processmaker.com>
This commit is contained in:
@@ -1,27 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* cases_Resume.php
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
/* Permissions */
|
||||
|
||||
use ProcessMaker\Util\DateTime;
|
||||
|
||||
switch ($RBAC->userCanAccess('PM_CASES')) {
|
||||
case - 2:
|
||||
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
|
||||
@@ -99,5 +79,6 @@ $oHeadPublisher->addScriptFile('/jscore/cases/core/cases_Step.js');
|
||||
$Fields['isIE'] = Bootstrap::isIE();
|
||||
|
||||
$G_PUBLISH = new Publisher();
|
||||
$Fields = DateTime::convertUtcToTimeZone($Fields);
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_CatchSelfService.xml', '', $Fields, 'cases_CatchExecute');
|
||||
G::RenderPage('publish', 'blank');
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
use ProcessMaker\BusinessModel\Task as BusinessModelTask;
|
||||
use ProcessMaker\Util\DateTime;
|
||||
|
||||
/* Permissions */
|
||||
switch ($RBAC->userCanAccess('PM_CASES')) {
|
||||
@@ -123,6 +124,7 @@ if ($nTasksInParallel > 1) {
|
||||
}
|
||||
|
||||
$Fields['TAS_TITLE'] = $aTask['TAS_TITLE'];
|
||||
$Fields = DateTime::convertUtcToTimeZone($Fields);
|
||||
|
||||
$objUser = new Users();
|
||||
$oHeadPublisher = headPublisher::getSingleton();
|
||||
@@ -150,10 +152,10 @@ if ($Fields['APP_STATUS'] != 'COMPLETED') {
|
||||
$FieldsPar['CURRENT_USER'] = '';
|
||||
}
|
||||
}
|
||||
$FieldsPar['DEL_DELEGATE_DATE'] = $row['DEL_DELEGATE_DATE'];
|
||||
$FieldsPar['DEL_INIT_DATE'] = $row['DEL_INIT_DATE'];
|
||||
$FieldsPar['DEL_TASK_DUE_DATE'] = $row['DEL_TASK_DUE_DATE'];
|
||||
$FieldsPar['DEL_FINISH_DATE'] = $row['DEL_FINISH_DATE'];
|
||||
$FieldsPar['DEL_DELEGATE_DATE'] = DateTime::convertUtcToTimeZone($row['DEL_DELEGATE_DATE']);
|
||||
$FieldsPar['DEL_INIT_DATE'] = DateTime::convertUtcToTimeZone($row['DEL_INIT_DATE']);
|
||||
$FieldsPar['DEL_TASK_DUE_DATE'] = DateTime::convertUtcToTimeZone($row['DEL_TASK_DUE_DATE']);
|
||||
$FieldsPar['DEL_FINISH_DATE'] = DateTime::convertUtcToTimeZone($row['DEL_FINISH_DATE']);
|
||||
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'cases/cases_Resume_Current_Task.xml', '', $FieldsPar);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,6 +149,10 @@ try {
|
||||
$criteria->add(ProcessUserPeer::USR_UID, $usrUid, Criteria::EQUAL);
|
||||
$criteria->add(ProcessUserPeer::PU_TYPE, "SUPERVISOR", Criteria::EQUAL);
|
||||
ProcessUserPeer::doDelete($criteria);
|
||||
//Destroy session after delete user
|
||||
$RBAC->destroySessionUser($usrUid);
|
||||
(new OauthClients())->removeByUser($usrUid);
|
||||
|
||||
G::auditLog("DeleteUser", "User Name: ". $userName." User ID: (".$usrUid.") ");
|
||||
break;
|
||||
case 'changeUserStatus':
|
||||
@@ -160,6 +164,8 @@ try {
|
||||
$userData = $userInstance->load($_REQUEST['USR_UID']);
|
||||
$userData['USR_STATUS'] = $_REQUEST['NEW_USR_STATUS'];
|
||||
$userInstance->update($userData);
|
||||
//Destroy session after inactive user
|
||||
$_REQUEST['NEW_USR_STATUS'] == 'INACTIVE' ? $RBAC->destroySessionUser($_REQUEST['USR_UID']) : null;
|
||||
|
||||
$msg = $_REQUEST['NEW_USR_STATUS'] == 'ACTIVE'? "EnableUser" : "DisableUser";
|
||||
G::auditLog($msg, "User Name: ".$userData['USR_USERNAME']." User ID: (".$userData['USR_UID'].") ");
|
||||
|
||||
Reference in New Issue
Block a user