This commit is contained in:
Paula Quispe
2017-10-19 14:37:15 -04:00
committed by davidcallizaya
parent 5327ecdfd5
commit 1647edb43e

View File

@@ -1,33 +1,4 @@
<?php
/**
* TaskUser.php
*
* @package workflow.engine.classes.model
*
* ProcessMaker Open Source Edition
* Copyright (C) 2004 - 2011 Colosa Inc.
*
* 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.
*
*/
//require_once 'classes/model/om/BaseTaskUser.php';
//require_once 'classes/model/Content.php';
/**
* Skeleton subclass for representing a row from the 'GROUP_USER' table.
*
@@ -39,6 +10,8 @@
*
* @package workflow.engine.classes.model
*/
use ProcessMaker\BusinessModel\WebEntry;
class TaskUser extends BaseTaskUser
{
@@ -54,8 +27,9 @@ class TaskUser extends BaseTaskUser
{
$connection = Propel::getConnection(TaskUserPeer::DATABASE_NAME);
try {
$bmWebEntry = new WebEntry;
//Check the usrUid value
if (RBAC::isGuestUserUid($requestData['USR_UID'])) {
if (RBAC::isGuestUserUid($requestData['USR_UID']) && !$bmWebEntry->isTaskAWebEntry($requestData['TAS_UID'])) {
throw new Exception(G::LoadTranslation("ID_USER_CAN_NOT_UPDATE", array($requestData['USR_UID'])));
return false;
}