PMCORE-2333 Web entry can still be used/create cases when process is inactive

This commit is contained in:
Roly Rudy Gutierrez Pinto
2021-03-02 13:00:23 -04:00
parent d1f61a99fe
commit 3d3a4f2da7
4 changed files with 42 additions and 12 deletions

View File

@@ -1,4 +1,7 @@
<?php
use ProcessMaker\Model\Process;
/**
* This page is the WebEntry Access Point.
*/
@@ -18,6 +21,14 @@ $configuration = $conf->getConfiguration(
$userInformationFormat = isset($outResult['format']) ? $outResult['format'] :
'@lastName, @firstName (@userName)';
$webEntryModel = \WebEntryPeer::retrieveByPK($weUid);
if (!Process::isActive($webEntryModel->getProUid(), 'PRO_UID')) {
$G_PUBLISH = new Publisher();
$G_PUBLISH->AddContent('xmlform', 'xmlform', 'login/showMessage', '', [
'MESSAGE' => G::LoadTranslation('ID_THE_WEBSITE_CAN_NOT_BE_REACHED')
]);
G::RenderPage('publish', 'blank');
exit();
}
?>
<html>
<head>