From 1985f942c2f0a89afde10b3bbe55e7fb88167dec Mon Sep 17 00:00:00 2001 From: eriknyk Date: Tue, 23 Sep 2014 16:58:29 -0400 Subject: [PATCH 1/5] Litle fiz to use Resource Owner grant type on Oauth2 Service --- workflow/engine/src/ProcessMaker/Services/OAuth2/PmPdo.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/engine/src/ProcessMaker/Services/OAuth2/PmPdo.php b/workflow/engine/src/ProcessMaker/Services/OAuth2/PmPdo.php index 2f84112bc..e7d909314 100644 --- a/workflow/engine/src/ProcessMaker/Services/OAuth2/PmPdo.php +++ b/workflow/engine/src/ProcessMaker/Services/OAuth2/PmPdo.php @@ -209,7 +209,7 @@ class PmPdo implements \OAuth2\Storage\AuthorizationCodeInterface, // the default behavior is to use "username" as the user_id return array_merge(array( - 'user_id' => $username + 'user_id' => $userInfo['USR_UID'] //$username ), $userInfo); } From 37fb344223ed456266fdfb1cbb5a87c1873ca67f Mon Sep 17 00:00:00 2001 From: Luis Fernando Saisa Lopez Date: Tue, 23 Sep 2014 17:16:31 -0400 Subject: [PATCH 2/5] BUG 15836 "Error al validar las politicas de..." SOLVED --- workflow/engine/methods/login/authentication.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/engine/methods/login/authentication.php b/workflow/engine/methods/login/authentication.php index 28c631062..7ead89e9b 100755 --- a/workflow/engine/methods/login/authentication.php +++ b/workflow/engine/methods/login/authentication.php @@ -43,7 +43,7 @@ try { require_once PATH_CORE . 'methods' . PATH_SEP . 'enterprise' . PATH_SEP . 'enterprise.php'; $enterprise = new enterprisePlugin('enterprise'); - + if (!file_exists(PATH_DATA_SITE . "plugin.singleton")) { $enterprise->enable(); } @@ -100,7 +100,7 @@ try { $errLabel = 'WRONG_LOGIN_CREDENTIALS'; } - $_SESSION["USERNAME_PREVIOUS1"] = $_SESSION["USERNAME_PREVIOUS2"]; + $_SESSION["USERNAME_PREVIOUS1"] = (isset($_SESSION["USERNAME_PREVIOUS2"]))? $_SESSION["USERNAME_PREVIOUS2"] : ""; $_SESSION["USERNAME_PREVIOUS2"] = $usr; if (!isset($uid) || $uid < 0) { From 02c6cd4da6db59daa88119f54e183e46d9847c7b Mon Sep 17 00:00:00 2001 From: Wendy Nestor Date: Wed, 24 Sep 2014 15:38:52 -0400 Subject: [PATCH 3/5] modificacion en la cantidad que devuelven los get, esto en los features case scheduler, file manager y project export/import --- .../projects/case_scheduler/main_tests_case_scheduler.feature | 4 ++-- .../projects/files_manager/main_test_files_manager.feature | 2 +- .../main_tests_project_export_import.feature | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/features/backend/projects/case_scheduler/main_tests_case_scheduler.feature b/features/backend/projects/case_scheduler/main_tests_case_scheduler.feature index 221530d3c..6c715f861 100644 --- a/features/backend/projects/case_scheduler/main_tests_case_scheduler.feature +++ b/features/backend/projects/case_scheduler/main_tests_case_scheduler.feature @@ -20,7 +20,7 @@ Scenario Outline: Get the case schedulers list when there are exactly zero case | test_description | project | record | | Get case scheduler of process Test Michelangelo | 1265557095225ff5c688f46031700471 | 0 | - | Get case scheduler of process Process Complete BPMN | 1455892245368ebeb11c1a5001393784 | 0 | + | Get case scheduler of process Process Complete BPMN | 1455892245368ebeb11c1a5001393784 | 1 | Scenario Outline: Create any case scheduler for a project @@ -122,7 +122,7 @@ Scenario Outline: Get the case schedulers list when there are exactly 16 case sc | test_description | project | record | | Get case scheduler of process Test Michelangelo | 1265557095225ff5c688f46031700471 | 16 | - | Get case scheduler of process Process Complete BPMN | 1455892245368ebeb11c1a5001393784 | 16 | + | Get case scheduler of process Process Complete BPMN | 1455892245368ebeb11c1a5001393784 | 17 | Scenario Outline: Update the case schedulers for a project and then check if the values had changed diff --git a/features/backend/projects/files_manager/main_test_files_manager.feature b/features/backend/projects/files_manager/main_test_files_manager.feature index 5318f62ff..1eaff37ce 100644 --- a/features/backend/projects/files_manager/main_test_files_manager.feature +++ b/features/backend/projects/files_manager/main_test_files_manager.feature @@ -35,7 +35,7 @@ Scenario Outline: Get a list public folder of process files manager Examples: | test_description | project | records | | Get list of process Test Michelangelo | 1265557095225ff5c688f46031700471 | 0 | - | Get list of process Process Complete BPMN | 1455892245368ebeb11c1a5001393784 | 2 | + | Get list of process Process Complete BPMN | 1455892245368ebeb11c1a5001393784 | 4 | Scenario Outline: Get a list templates folder of process files manager diff --git a/features/backend/projects/project_export_import/main_tests_project_export_import.feature b/features/backend/projects/project_export_import/main_tests_project_export_import.feature index 57f673c1d..df679196f 100644 --- a/features/backend/projects/project_export_import/main_tests_project_export_import.feature +++ b/features/backend/projects/project_export_import/main_tests_project_export_import.feature @@ -78,7 +78,7 @@ Scenario: Get a list templates folder of process files manager And the response charset is "UTF-8" And the content type is "application/json" And the type is "array" - And the response has 1 records + And the response has 2 records Scenario: Verify that there are report tables Given I request "project/1455892245368ebeb11c1a5001393784/report-tables" From 540d9578b65d0178fe806fa516a81e68270cc0b8 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Thu, 25 Sep 2014 13:35:37 -0400 Subject: [PATCH 4/5] BUG 15709 Can't create/update additional/existing calendars SOLVED --- workflow/engine/controllers/adminProxy.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/workflow/engine/controllers/adminProxy.php b/workflow/engine/controllers/adminProxy.php index b6e5b7fbd..5afd4ee74 100644 --- a/workflow/engine/controllers/adminProxy.php +++ b/workflow/engine/controllers/adminProxy.php @@ -186,13 +186,15 @@ class adminProxy extends HttpProxyController $message = G::loadTranslation('ID_CALENDAR_INVALID_NAME'); break; } - if ($aDefinitions['CALENDAR_NAME'] != $_POST['name']) { - $validated = true; - } else { - if ($aDefinitions['CALENDAR_NAME'] != $oldName) { - $validated = false; - $message = G::loadTranslation('ID_CALENDAR_INVALID_NAME'); - break; + if (isset($aDefinitions['CALENDAR_NAME'])) { + if ($aDefinitions['CALENDAR_NAME'] != $_POST['name']) { + $validated = true; + } else { + if ($aDefinitions['CALENDAR_NAME'] != $oldName) { + $validated = false; + $message = G::loadTranslation('ID_CALENDAR_INVALID_NAME'); + break; + } } } } From 0835a60e1e4cd6e2c3f5fe51c3c7c162140a4f75 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Thu, 25 Sep 2014 15:33:21 -0400 Subject: [PATCH 5/5] Fix a copule of notices messages in the code --- workflow/engine/controllers/installer.php | 12 ++++++------ workflow/engine/methods/setup/appCacheViewAjax.php | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/workflow/engine/controllers/installer.php b/workflow/engine/controllers/installer.php index 47c0e6786..c1cfdb771 100755 --- a/workflow/engine/controllers/installer.php +++ b/workflow/engine/controllers/installer.php @@ -562,10 +562,10 @@ class Installer extends Controller public function setGrantPrivilegesMySQL ($psUser, $psPassword, $psDatabase, $host) { $host = ($host == 'localhost' || $host == '127.0.0.1' ? 'localhost' : '%'); - + $sql = sprintf( "GRANT ALL PRIVILEGES ON `%s`.* TO %s@'%s' IDENTIFIED BY '%s' WITH GRANT OPTION", $psDatabase, $psUser, $host, $psPassword ); $query = @mysql_query( $sql, $this->link ); - + if (! $query) { $errorMessage = mysql_error( $this->link ); $this->installLog( G::LoadTranslation('ID_MYSQL_ERROR', SYS_LANG, Array($errorMessage) ) ); @@ -644,7 +644,7 @@ class Installer extends Controller $adminPassword = trim( $_REQUEST['adminPassword'] ); $adminUsername = trim( $_REQUEST['adminUsername'] ); $deleteDB = ($_REQUEST['deleteDB'] == 'true'); - $userLogged = ($_REQUEST['userLogged'] == 'true'); + $userLogged = (isset($_REQUEST['userLogged']) ? ($_REQUEST['userLogged'] == 'true') : false); if (substr( $pathShared, - 1 ) != '/') { $pathShared .= '/'; @@ -712,7 +712,7 @@ class Installer extends Controller $dbText .= sprintf( " define ('DB_REPORT_NAME', '%s' );\n", $wf_workpace ); $dbText .= sprintf( " define ('DB_REPORT_USER', '%s' );\n", $wf ); $dbText .= sprintf( " define ('DB_REPORT_PASS', '%s' );\n", $wfPass ); - + if (defined('PARTNER_FLAG') || isset($_REQUEST['PARTNER_FLAG'])) { $dbText .= "\n"; $dbText .= " define ('PARTNER_FLAG', " . ((defined('PARTNER_FLAG')) ? PARTNER_FLAG : ((isset($_REQUEST['PARTNER_FLAG'])) ? $_REQUEST['PARTNER_FLAG']:'false')) . ");\n"; @@ -889,7 +889,7 @@ class Installer extends Controller // inserting the outh_client $query = sprintf( "USE %s;", $wf ); $this->mysqlQuery( $query ); - $query = ( "INSERT INTO OAUTH_CLIENTS (CLIENT_ID,CLIENT_SECRET,CLIENT_NAME,CLIENT_DESCRIPTION,CLIENT_WEBSITE,REDIRECT_URI,USR_UID ) VALUES + $query = ( "INSERT INTO OAUTH_CLIENTS (CLIENT_ID,CLIENT_SECRET,CLIENT_NAME,CLIENT_DESCRIPTION,CLIENT_WEBSITE,REDIRECT_URI,USR_UID ) VALUES ('x-pm-local-client','179ad45c6ce2cb97cf1029e212046e81','PM Web Designer','ProcessMaker Web Designer App','www.processmaker.com','" . $endpoint . "','00000000000000000000000000000001' )"); $this->mysqlQuery( $query ); @@ -983,7 +983,7 @@ class Installer extends Controller //CREATE users and GRANT Privileges $wfPass = G::generate_password( 12 ); $this->setGrantPrivilegesMSSQL( $wf, $wfPass, $wf ); - + //Generate the db.php file and folders $path_site = $pathShared . "/sites/" . $workspace . "/"; $db_file = $path_site . "db.php"; diff --git a/workflow/engine/methods/setup/appCacheViewAjax.php b/workflow/engine/methods/setup/appCacheViewAjax.php index 7c82744c1..23efa9ce0 100755 --- a/workflow/engine/methods/setup/appCacheViewAjax.php +++ b/workflow/engine/methods/setup/appCacheViewAjax.php @@ -257,7 +257,7 @@ switch ($request) { $conf->aConfig = $confParams; $conf->saveConfig( 'APP_CACHE_VIEW_ENGINE', '', '', '' ); - $response = new StdClass(); + $result = new StdClass(); $result->success = true; $result->msg = G::LoadTranslation('ID_TITLE_COMPLETED');