HOR-4816
This commit is contained in:
@@ -1,46 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* cases_SchedulerValidateUser.php
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2010 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.
|
||||
*/
|
||||
|
||||
/**
|
||||
* process_SchedulerValidate_User
|
||||
* validates if the username and password are valid data and if the user assigned
|
||||
* to the process and task has the rights and persmissions required to create a cron task
|
||||
*/
|
||||
use ProcessMaker\Core\System;
|
||||
|
||||
$sWS_USER = trim( $_REQUEST['USERNAME'] );
|
||||
$sWS_PASS = trim( $_REQUEST['PASSWORD'] );
|
||||
|
||||
$streamContext = [];
|
||||
|
||||
if (G::is_https()) {
|
||||
$http = 'https://';
|
||||
$streamContext = ['stream_context' => stream_context_create(['ssl' => ['verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true]])];
|
||||
} else {
|
||||
$http = 'http://';
|
||||
}
|
||||
|
||||
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
|
||||
$endpoint = System::getServerMainPath() . '/services/wsdl2';
|
||||
$client = new SoapClient($endpoint, $streamContext);
|
||||
|
||||
$user = $sWS_USER;
|
||||
|
||||
@@ -267,7 +267,7 @@ try {
|
||||
$aLog['LOG_SID'] = session_id();
|
||||
$aLog['LOG_INIT_DATE'] = date('Y-m-d H:i:s');
|
||||
//$aLog['LOG_END_DATE'] = '0000-00-00 00:00:00';
|
||||
$aLog['LOG_CLIENT_HOSTNAME']= $_SERVER['HTTP_HOST'];
|
||||
$aLog['LOG_CLIENT_HOSTNAME']= System::getServerHost();
|
||||
$aLog['USR_UID'] = $_SESSION['USER_LOGGED'];
|
||||
$weblog->create($aLog);
|
||||
/**end log**/
|
||||
|
||||
@@ -32,7 +32,6 @@ try {
|
||||
throw (new Exception( G::LoadTranslation('ID_TASK') . "'" . $TaskFields['TAS_TITLE'] . "'" . G::LoadTranslation('ID_NOT_HAVE_USERS')));
|
||||
}
|
||||
|
||||
$http = (G::is_https())? "https://" : "http://";
|
||||
$sContent = '';
|
||||
|
||||
$infoProcess = new Process();
|
||||
@@ -68,8 +67,8 @@ try {
|
||||
$pluginTpl = PATH_CORE . 'templates' . PATH_SEP . 'processes' . PATH_SEP . 'webentryPost.tpl';
|
||||
$template = new TemplatePower( $pluginTpl );
|
||||
$template->prepare();
|
||||
$template->assign( 'wsdlUrl', $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2' );
|
||||
$template->assign( 'wsUploadUrl', $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/upload' );
|
||||
$template->assign( 'wsdlUrl', System::getServerMainPath() . '/services/wsdl2' );
|
||||
$template->assign( 'wsUploadUrl', System::getServerMainPath() . '/services/upload' );
|
||||
$template->assign( 'processUid', $sPRO_UID );
|
||||
$template->assign( 'dynaformUid', $sDYNAFORM );
|
||||
$template->assign( 'taskUid', $sTASKS );
|
||||
@@ -134,18 +133,18 @@ try {
|
||||
$aDataEvent['EVN_CONDITIONS'] = $sWS_USER;
|
||||
$output = $oEvent->update( $aDataEvent );
|
||||
//Show link
|
||||
$link = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/' . $sPRO_UID . '/' . $dynTitle . '.php';
|
||||
$link = System::getServerMainPath() . '/' . $sPRO_UID . '/' . $dynTitle . '.php';
|
||||
print $link;
|
||||
//print "\n<a href='$link' target='_new' > $link </a>";
|
||||
|
||||
} else {
|
||||
$G_FORM = new Form( $sPRO_UID . '/' . $sDYNAFORM, PATH_DYNAFORM, SYS_LANG, false );
|
||||
$G_FORM->action = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/cases_StartExternal.php';
|
||||
$G_FORM->action = System::getServerMainPath() . '/services/cases_StartExternal.php';
|
||||
|
||||
$scriptCode = '';
|
||||
$scriptCode = $G_FORM->render( PATH_CORE . 'templates/' . 'xmlform' . '.html', $scriptCode );
|
||||
$scriptCode = str_replace( '/controls/', $http . $_SERVER['HTTP_HOST'] . '/controls/', $scriptCode );
|
||||
$scriptCode = str_replace( '/js/maborak/core/images/', $http . $_SERVER['HTTP_HOST'] . '/js/maborak/core/images/', $scriptCode );
|
||||
$scriptCode = str_replace( '/controls/', System::getServerProtocolHost() . '/controls/', $scriptCode );
|
||||
$scriptCode = str_replace( '/js/maborak/core/images/', System::getServerProtocolHost() . '/js/maborak/core/images/', $scriptCode );
|
||||
|
||||
//render the template
|
||||
$pluginTpl = PATH_CORE . 'templates' . PATH_SEP . 'processes' . PATH_SEP . 'webentry.tpl';
|
||||
@@ -157,7 +156,7 @@ try {
|
||||
|
||||
$template->assign("URL_MABORAK_JS", G::browserCacheFilesUrl("/js/maborak/core/maborak.js"));
|
||||
$template->assign("URL_TRANSLATION_ENV_JS", G::browserCacheFilesUrl("/jscore/labels/" . SYS_LANG . ".js"));
|
||||
$template->assign("siteUrl", $http . $_SERVER["HTTP_HOST"]);
|
||||
$template->assign("siteUrl", System::getServerProtocolHost());
|
||||
$template->assign("sysSys", config("system.workspace"));
|
||||
$template->assign("sysLang", SYS_LANG);
|
||||
$template->assign("sysSkin", SYS_SKIN);
|
||||
@@ -171,7 +170,7 @@ try {
|
||||
if (sizeof( $sUidGrids ) > 0) {
|
||||
foreach ($sUidGrids as $k => $v) {
|
||||
$template->newBlock( 'grid_uids' );
|
||||
$template->assign( 'siteUrl', $http . $_SERVER['HTTP_HOST'] );
|
||||
$template->assign( 'siteUrl', System::getServerProtocolHost() );
|
||||
$template->assign( 'gridFileName', $sPRO_UID . '/' . $v );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* process_webEntryValidate
|
||||
* validates if the username and password are valid data and if the user assigned
|
||||
* to the webentry has the rights and persmissions required
|
||||
*/
|
||||
|
||||
use ProcessMaker\Core\System;
|
||||
|
||||
$sPRO_UID = $oData->PRO_UID;
|
||||
$sTASKS = $oData->TASKS;
|
||||
@@ -16,20 +13,12 @@ $sWS_PASS = trim( $oData->WS_PASS );
|
||||
$sWS_ROUNDROBIN = $oData->WS_ROUNDROBIN;
|
||||
$sWE_USR = $oData->WE_USR;
|
||||
|
||||
//echo ($sPRO_UID."<br>");
|
||||
//echo ($sTASKS."<br>");
|
||||
//echo ($sDYNAFORM."<br>");
|
||||
|
||||
$streamContext = [];
|
||||
|
||||
if (G::is_https()) {
|
||||
$http = 'https://';
|
||||
$streamContext = ['stream_context' => stream_context_create(['ssl' => ['verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true]])]; //lsl
|
||||
} else {
|
||||
$http = 'http://';
|
||||
}
|
||||
|
||||
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
|
||||
$endpoint = System::getServerMainPath() . '/services/wsdl2';
|
||||
$client = new SoapClient( $endpoint, $streamContext );
|
||||
|
||||
$user = $sWS_USER;
|
||||
|
||||
@@ -1,28 +1,19 @@
|
||||
<?php
|
||||
/**
|
||||
* webEntryValidate_Val_assig
|
||||
* it gets the assign type for the task
|
||||
* with pro_uid and tas_uid
|
||||
*/
|
||||
|
||||
use ProcessMaker\Core\System;
|
||||
|
||||
$sPRO_UID = $oData->PRO_UID;
|
||||
$sTASKS = $oData->TASKS;
|
||||
$sDYNAFORM = $oData->DYNAFORM;
|
||||
|
||||
if (G::is_https())
|
||||
$http = 'https://';
|
||||
else
|
||||
$http = 'http://';
|
||||
|
||||
$endpoint = $http . $_SERVER['HTTP_HOST'] . '/sys' . config("system.workspace") . '/' . SYS_LANG . '/' . SYS_SKIN . '/services/wsdl2';
|
||||
@$client = new SoapClient( $endpoint );
|
||||
$endpoint = System::getServerMainPath() . '/services/wsdl2';
|
||||
@$client = new SoapClient($endpoint);
|
||||
|
||||
$oTask = new Task();
|
||||
$TaskFields = $oTask->kgetassigType( $sPRO_UID, $sTASKS );
|
||||
$TaskFields = $oTask->kgetassigType($sPRO_UID, $sTASKS);
|
||||
|
||||
if ($TaskFields['TAS_ASSIGN_TYPE'] == 'BALANCED')
|
||||
if ($TaskFields['TAS_ASSIGN_TYPE'] == 'BALANCED') {
|
||||
echo 1;
|
||||
else
|
||||
} else {
|
||||
echo 0;
|
||||
|
||||
?>
|
||||
}
|
||||
|
||||
@@ -1,26 +1,7 @@
|
||||
<?php
|
||||
/**
|
||||
* webServicesSetup.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.
|
||||
*/
|
||||
|
||||
use ProcessMaker\Core\System;
|
||||
|
||||
if (($RBAC_Response = $RBAC->userCanAccess( "PM_FACTORY" )) != 1)
|
||||
return $RBAC_Response;
|
||||
|
||||
@@ -28,7 +9,7 @@ $dbc = new DBConnection();
|
||||
$ses = new DBSession( $dbc );
|
||||
|
||||
if (! isset( $_SESSION['END_POINT'] )) {
|
||||
$aFields['WS_HOST'] = $_SERVER['HTTP_HOST'];
|
||||
$aFields['WS_HOST'] = System::getServerHost();
|
||||
$aFields['WS_WORKSPACE'] = config("system.workspace");
|
||||
} else {
|
||||
if (strpos( $_SESSION['END_POINT'], 'https' ) !== false) {
|
||||
|
||||
Reference in New Issue
Block a user