From 9257e533c2ccc333ebd602cdb69d92cb180463eb Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Thu, 27 Apr 2017 12:18:35 -0400 Subject: [PATCH] HOR-1750 --- framework/src/Maveriks/WebApplication.php | 4 ++ .../Policies/ControlUnderUpdating.php | 56 +++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 workflow/engine/src/ProcessMaker/Policies/ControlUnderUpdating.php diff --git a/framework/src/Maveriks/WebApplication.php b/framework/src/Maveriks/WebApplication.php index 21c9473e1..4296a8fac 100644 --- a/framework/src/Maveriks/WebApplication.php +++ b/framework/src/Maveriks/WebApplication.php @@ -254,6 +254,8 @@ class WebApplication $authenticationClass = 'ProcessMaker\\Services\\OAuth2\\Server'; // $accessControlClass - contains the class name that validate the Access Control for Restler $accessControlClass = 'ProcessMaker\\Policies\\AccessControl'; + // $controlUnderUpdating - ControlUnderUpdating sends an error signal 503 to report that the application is in update + $controlUnderUpdating = 'ProcessMaker\\Policies\\ControlUnderUpdating'; // $pmOauthClientId - contains PM Local OAuth Id (Web Designer) $pmOauthClientId = 'x-pm-local-client'; @@ -301,6 +303,8 @@ class WebApplication $this->rest->addAuthenticationClass($authenticationClass, ''); // adding $accessControlClass to Restler $this->rest->addAuthenticationClass($accessControlClass); + // adding $controlUnderUpdating to Restler + $this->rest->addAuthenticationClass($controlUnderUpdating); // Setting database connection source list($host, $port) = strpos(DB_HOST, ':') !== false ? explode(':', DB_HOST) : array(DB_HOST, ''); diff --git a/workflow/engine/src/ProcessMaker/Policies/ControlUnderUpdating.php b/workflow/engine/src/ProcessMaker/Policies/ControlUnderUpdating.php new file mode 100644 index 000000000..c5c37e595 --- /dev/null +++ b/workflow/engine/src/ProcessMaker/Policies/ControlUnderUpdating.php @@ -0,0 +1,56 @@ +