Merge branch 'master' of bitbucket.org:colosa/processmaker

This commit is contained in:
Freddy Daniel Rojas Valda
2014-10-03 12:31:13 -04:00
36 changed files with 342 additions and 370 deletions

View File

@@ -8,7 +8,7 @@ Feature: Case Scheduler Main Tests
Background: Background:
Given that I have a valid access_token Given that I have a valid access_token
Scenario Outline: Get the case schedulers list when there are exactly zero case schedulers Scenario Outline: Get the case schedulers list when there are exactly case schedulers
Given I request "project/<project>/case-schedulers" Given I request "project/<project>/case-schedulers"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
@@ -116,7 +116,7 @@ Scenario Outline: Get the case schedulers list when there are exactly 16 case sc
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the content type is "application/json" And the content type is "application/json"
And the type is "array" And the type is "array"
And the response has 16 record And the response has <record> record
Examples: Examples:

View File

@@ -3,15 +3,22 @@ Feature: Report Tables
Requirements: Requirements:
a workspace with the process 922677707524ac7417ce345089010125 ("Test Designer Report Tables") already loaded a workspace with the process 922677707524ac7417ce345089010125 ("Test Designer Report Tables") already loaded
there are zero Report Table in the process there are zero Report Table in the process
and workspace with the process 1455892245368ebeb11c1a5001393784 - "Process Complete BPMN" already loaded" already loaded
Background: Background:
Given that I have a valid access_token Given that I have a valid access_token
Scenario: Verify that there are no report tables Scenario Outline: Verify that there are no report tables
Given I request "project/922677707524ac7417ce345089010125/report-tables" Given I request "project/<project>/report-tables"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the response has 0 record And the response has <record> record
Examples:
| test_description | project | record |
| Get of report table of process Test Designer Report Tables | 922677707524ac7417ce345089010125 | 0 |
| Get of report table of process Process Complete BPMN | 1455892245368ebeb11c1a5001393784 | 1 |
Scenario Outline: Create new report tables from dynaform and grid Scenario Outline: Create new report tables from dynaform and grid
Given POST this data: Given POST this data:
@@ -52,8 +59,8 @@ Scenario Outline: Create new report tables from dynaform and grid
Examples: Examples:
| test_description | project | rep_uid_number | rep_tab_name | rep_tab_dsc | rep_tab_connection | rep_tab_type | rep_tab_grid | fld_dyn_1 | fld_name_1 | fld_label_1 | fld_type_1 | fld_size_1 | fld_dyn_2 | fld_name_2 | fld_label_2 | fld_type_2 | fld_size_2 | fld_dyn_3 | fld_name_3 | fld_label_3 | fld_type_3 | fld_size_3 | | test_description | project | rep_uid_number | rep_tab_name | rep_tab_dsc | rep_tab_connection | rep_tab_type | rep_tab_grid | fld_dyn_1 | fld_name_1 | fld_label_1 | fld_type_1 | fld_size_1 | fld_dyn_2 | fld_name_2 | fld_label_2 | fld_type_2 | fld_size_2 | fld_dyn_3 | fld_name_3 | fld_label_3 | fld_type_3 | fld_size_3 |
| Create a Report Table - Normal | 922677707524ac7417ce345089010125 | 1 | REPORT_TABLE_1 | Report Table Desc 1 | workflow | NORMAL | | nameany | NAME_ANY | Name Any | VARCHAR | 64 | date1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 15 | | Create a Report Table - Normal .pm | 922677707524ac7417ce345089010125 | 1 | REPORT_TABLE_1 | Report Table Desc 1 | workflow | NORMAL | | nameany | NAME_ANY | Name Any | VARCHAR | 64 | date1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 15 |
| Create a Report Table - Grid | 922677707524ac7417ce345089010125 | 2 | REPORT_TABLE_2 | Report Table Desc 2 | workflow | GRID | 267480685524ac9b3bd5e23004484669 | text1 | TEXT_1 | Text 1 | VARCHAR | 64 | fecha1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 15 | | Create a Report Table - Grid .pm | 922677707524ac7417ce345089010125 | 2 | REPORT_TABLE_2 | Report Table Desc 2 | workflow | GRID | 267480685524ac9b3bd5e23004484669 | text1 | TEXT_1 | Text 1 | VARCHAR | 64 | fecha1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 15 |
Scenario: Create a new database connection with same name Scenario: Create a new database connection with same name
@@ -81,11 +88,15 @@ Scenario: Create a new database connection with same name
And the response status message should have the following text "already exits" And the response status message should have the following text "already exits"
Scenario: Verify that there are 2 report tables Scenario Outline: Verify that there are 2 report tables
Given I request "project/922677707524ac7417ce345089010125/report-tables" Given I request "project/<project>/report-tables"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the response has 2 record And the response has <record> record
Examples:
| test_description | project | record |
| Get of report table of process Test Designer Report Tables | 922677707524ac7417ce345089010125 | 2 |
Scenario Outline: Update a created report tables Scenario Outline: Update a created report tables
@@ -126,8 +137,8 @@ Scenario Outline: Update a created report tables
Examples: Examples:
| test_description | project | rep_uid_number | rep_tab_name | rep_tab_dsc | rep_tab_connection | rep_tab_type | rep_tab_grid | fld_dyn_1 | fld_name_1 | fld_label_1 | fld_type_1 | fld_size_1 | fld_dyn_2 | fld_name_2 | fld_label_2 | fld_type_2 | fld_size_2 | fld_dyn_3 | fld_name_3 | fld_label_3 | fld_type_3 | fld_size_3 | | test_description | project | rep_uid_number | rep_tab_name | rep_tab_dsc | rep_tab_connection | rep_tab_type | rep_tab_grid | fld_dyn_1 | fld_name_1 | fld_label_1 | fld_type_1 | fld_size_1 | fld_dyn_2 | fld_name_2 | fld_label_2 | fld_type_2 | fld_size_2 | fld_dyn_3 | fld_name_3 | fld_label_3 | fld_type_3 | fld_size_3 |
| Update a Report Table - Normal | 922677707524ac7417ce345089010125 | 1 | REPORT_TABLE_1 | Report Table Desc Updated 1 | workflow | NORMAL | | nameany | NAME_ANY | Name Any | VARCHAR | 64 | date1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 150 | | Update a Report Table - Normal .pm | 922677707524ac7417ce345089010125 | 1 | REPORT_TABLE_1 | Report Table Desc Updated 1 | workflow | NORMAL | | nameany | NAME_ANY | Name Any | VARCHAR | 64 | date1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 150 |
| Update a Report Table - Grid | 922677707524ac7417ce345089010125 | 2 | REPORT_TABLE_2 | Report Table Desc Updated 2 | workflow | GRID | 267480685524ac9b3bd5e23004484669 | text1 | TEXT_1 | Text 1 | VARCHAR | 64 | fecha1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 150 | | Update a Report Table - Grid .pm | 922677707524ac7417ce345089010125 | 2 | REPORT_TABLE_2 | Report Table Desc Updated 2 | workflow | GRID | 267480685524ac9b3bd5e23004484669 | text1 | TEXT_1 | Text 1 | VARCHAR | 64 | fecha1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 150 |
Scenario Outline: Get a details of created report tables Scenario Outline: Get a details of created report tables
@@ -141,9 +152,9 @@ Scenario Outline: Get a details of created report tables
Examples: Examples:
| project | rep_uid_number | rep_tab_name | rep_tab_dsc | rep_tab_connection | rep_tab_type | rep_tab_grid | fld_dyn_1 | fld_name_1 | fld_label_1 | fld_type_1 | fld_size_1 | fld_dyn_2 | fld_name_2 | fld_label_2 | fld_type_2 | fld_size_2 | fld_dyn_3 | fld_name_3 | fld_label_3 | fld_type_3 | fld_size_3 | | test_description | project | rep_uid_number | rep_tab_name | rep_tab_dsc | rep_tab_connection | rep_tab_type | rep_tab_grid | fld_dyn_1 | fld_name_1 | fld_label_1 | fld_type_1 | fld_size_1 | fld_dyn_2 | fld_name_2 | fld_label_2 | fld_type_2 | fld_size_2 | fld_dyn_3 | fld_name_3 | fld_label_3 | fld_type_3 | fld_size_3 |
| 922677707524ac7417ce345089010125 | 1 | REPORT_TABLE_1 | Report Table Desc Updated 1 | workflow | NORMAL | | nameany | NAME_ANY | Name Any | VARCHAR | 64 | date1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 150 | | Update a Report Table - Normal .pm | 922677707524ac7417ce345089010125 | 1 | REPORT_TABLE_1 | Report Table Desc Updated 1 | workflow | NORMAL | | nameany | NAME_ANY | Name Any | VARCHAR | 64 | date1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 150 |
| 922677707524ac7417ce345089010125 | 2 | REPORT_TABLE_2 | Report Table Desc Updated 2 | workflow | GRID | grid | text1 | TEXT_1 | Text 1 | VARCHAR | 64 | fecha1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 150 | | Update a Report Table - Grid .pm | 922677707524ac7417ce345089010125 | 2 | REPORT_TABLE_2 | Report Table Desc Updated 2 | workflow | GRID | grid | text1 | TEXT_1 | Text 1 | VARCHAR | 64 | fecha1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 150 |
Scenario Outline: Populate report tables Scenario Outline: Populate report tables
@@ -154,9 +165,8 @@ Scenario Outline: Populate report tables
Examples: Examples:
| test_description | project | rep_uid_number | rep_tab_name | rep_tab_dsc | rep_tab_connection | rep_tab_type | rep_tab_grid | fld_dyn_1 | fld_name_1 | fld_label_1 | fld_type_1 | fld_size_1 | fld_dyn_2 | fld_name_2 | fld_label_2 | fld_type_2 | fld_size_2 | fld_dyn_3 | fld_name_3 | fld_label_3 | fld_type_3 | fld_size_3 | | test_description | project | rep_uid_number | rep_tab_name | rep_tab_dsc | rep_tab_connection | rep_tab_type | rep_tab_grid | fld_dyn_1 | fld_name_1 | fld_label_1 | fld_type_1 | fld_size_1 | fld_dyn_2 | fld_name_2 | fld_label_2 | fld_type_2 | fld_size_2 | fld_dyn_3 | fld_name_3 | fld_label_3 | fld_type_3 | fld_size_3 |
| Populate Report Table Normal | 922677707524ac7417ce345089010125 | 1 | REPORT_TABLE_1 | Report Table Desc Updated 1 | workflow | NORMAL | | nameany | NAME_ANY | Name Any | VARCHAR | 64 | date1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 150 | | Populate Report Table Normal .pm | 922677707524ac7417ce345089010125 | 1 | REPORT_TABLE_1 | Report Table Desc Updated 1 | workflow | NORMAL | | nameany | NAME_ANY | Name Any | VARCHAR | 64 | date1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 150 |
| Populate Report Table Grid | 922677707524ac7417ce345089010125 | 2 | REPORT_TABLE_2 | Report Table Desc Updated 2 | workflow | GRID | grid | text1 | TEXT_1 | Text 1 | VARCHAR | 64 | fecha1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 150 | | Populate Report Table Grid .pm | 922677707524ac7417ce345089010125 | 2 | REPORT_TABLE_2 | Report Table Desc Updated 2 | workflow | GRID | grid | text1 | TEXT_1 | Text 1 | VARCHAR | 64 | fecha1 | DATE_1 | Date | DATE | 0 | | CUSTOM_FIELD_1 | Custom Field 1 | VARCHAR | 150 |
Scenario Outline: Delete a created report tables Scenario Outline: Delete a created report tables
@@ -169,12 +179,18 @@ Scenario Outline: Delete a created report tables
Examples: Examples:
| test_description | project | rep_uid_number | | test_description | project | rep_uid_number |
| Delete Report Table Normal | 922677707524ac7417ce345089010125 | 1 | | Delete Report Table Normal .pm | 922677707524ac7417ce345089010125 | 1 |
| Delete Report Table Grid | 922677707524ac7417ce345089010125 | 2 | | Delete Report Table Grid .pm | 922677707524ac7417ce345089010125 | 2 |
Scenario: Verify that the report tables were deleted correctly
Given I request "project/922677707524ac7417ce345089010125/report-tables" Scenario Outline: Verify that the report tables were deleted correctly
Given I request "project/<project>/report-tables"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the response has 0 record And the response has <record> record
Examples:
| test_description | project | record |
| Get of report table of process Test Designer Report Tables | 922677707524ac7417ce345089010125 | 0 |
| Get of report table of process Process Complete BPMN | 1455892245368ebeb11c1a5001393784 | 1 |

View File

@@ -3,6 +3,7 @@ Feature: Web Entry Main Tests
Requirements: Requirements:
a workspace with the process 28733629952e66a362c4f63066393844 ("Sample Project #5 (Web Entry)") already loaded a workspace with the process 28733629952e66a362c4f63066393844 ("Sample Project #5 (Web Entry)") already loaded
there are zero web entry in the process there are zero web entry in the process
and workspace with the process 1455892245368ebeb11c1a5001393784 - "Process Complete BPMN" already loaded" already loaded
Background: Background:
Given that I have a valid access_token Given that I have a valid access_token
@@ -10,19 +11,22 @@ Background:
#ASSIGNEE USER OF AN ACTIVITY #ASSIGNEE USER OF AN ACTIVITY
Scenario Outline: List assignees of an activity Scenario Outline: List assignees of an activity
Given I request "project/28733629952e66a362c4f63066393844/activity/<tas_uid>/assignee" Given I request "project/<project>/activity/<tas_uid>/assignee"
And the content type is "application/json" And the content type is "application/json"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "array" And the type is "array"
And the json data is an empty array And the response has <records> records
Examples: Examples:
| tas_uid | tas_title | | Description | project | tas_uid | tas_title | records |
| 44199549652e66ba533bb06088252754 | Task 1 | | Get list activity of process .pm | 28733629952e66a362c4f63066393844 | 44199549652e66ba533bb06088252754 | Task 1 | 0 |
| 56118778152e66babcc2103002009439 | Task 2 | | Get list activity of process .pm | 28733629952e66a362c4f63066393844 | 56118778152e66babcc2103002009439 | Task 2 | 0 |
| 18096002352e66bc1643af8048493068 | Task 3 | | Get list activity of process .pm | 28733629952e66a362c4f63066393844 | 18096002352e66bc1643af8048493068 | Task 3 | 0 |
| Get list activity of process .pmx | 1455892245368ebeb11c1a5001393784 | 6274755055368eed1116388064384542 | Task 1 | 1 |
| Get list activity of process .pmx | 1455892245368ebeb11c1a5001393784 | 4790702485368efad167477011123879 | Task 2 | 1 |
| Get list activity of process .pmx | 1455892245368ebeb11c1a5001393784 | 2072984565368efc137a394001073529 | Task 3 | 1 |
Scenario Outline: Assign a user or group to an activity Scenario Outline: Assign a user or group to an activity
@@ -48,13 +52,19 @@ Scenario Outline: Assign a user or group to an activity
#WEB ENTRY #WEB ENTRY
Scenario: Get list Web Entries of a Project when there are exactly zero web entries Scenario Outline: Get list Web Entries of a Project when there are exactly zero web entries
And I request "project/28733629952e66a362c4f63066393844/web-entries" And I request "project/<project>/web-entries"
And the content type is "application/json" And the content type is "application/json"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "array" And the type is "array"
And the response has 0 records And the response has <records> records
Examples:
| Description | project | records |
| Get list web entry of process .pm | 28733629952e66a362c4f63066393844 | 0 |
| Get list web entry of process .pmx | 1455892245368ebeb11c1a5001393784 | 1 |
Scenario Outline: Create a new Web Entry using the method: PHP pages with Web Services Scenario Outline: Create a new Web Entry using the method: PHP pages with Web Services
@@ -70,7 +80,7 @@ Scenario Outline: Create a new Web Entry using the method: PHP pages with Web Se
"we_input_document_access": <we_input_document_access> "we_input_document_access": <we_input_document_access>
} }
""" """
And I request "project/28733629952e66a362c4f63066393844/web-entry" And I request "project/<project>/web-entry"
And the content type is "application/json" And the content type is "application/json"
Then the response status code should be 201 Then the response status code should be 201
And the response charset is "UTF-8" And the response charset is "UTF-8"
@@ -85,24 +95,33 @@ Scenario Outline: Create a new Web Entry using the method: PHP pages with Web Se
Examples: Examples:
| Description | we_number | tas_uid | we_title | dyn_uid | we_description | we_input_document_access | | Description | we_number | project | tas_uid | we_title | dyn_uid | we_description | we_input_document_access |
| Web entry PHP task 1, with values normal | 1 | 44199549652e66ba533bb06088252754 | Web Entry PHP 1 | 60308801852e66b7181ae21045247174 | Webservice PHP Description 1 | 1 | | Web entry PHP task 1, with values normal .pm | 1 | 28733629952e66a362c4f63066393844 | 44199549652e66ba533bb06088252754 | Web Entry PHP 1 | 60308801852e66b7181ae21045247174 | Webservice PHP Description 1 | 1 |
| Web entry PHP task 2, with character special | 2 | 56118778152e66babcc2103002009439 | Web Entry PHP 2 @#$%&* | 99869771852e66b7dc4b858088901665 | Webservice PHP Description 2 | 1 | | Web entry PHP task 2, with character special .pm | 2 | 28733629952e66a362c4f63066393844 | 56118778152e66babcc2103002009439 | Web Entry PHP 2 @#$%&* | 99869771852e66b7dc4b858088901665 | Webservice PHP Description 2 | 1 |
| Web entry PHP task 3, with we_input_document_access in 0 | 3 | 18096002352e66bc1643af8048493068 | Web Entry PHP 3 | 37977455352e66b892babe6071295002 | Webservice PHP Description 3 | 0 | | Web entry PHP task 3, with we_input_document_access in 0 .pm | 3 | 28733629952e66a362c4f63066393844 | 18096002352e66bc1643af8048493068 | Web Entry PHP 3 | 37977455352e66b892babe6071295002 | Webservice PHP Description 3 | 0 |
| Web entry PHP task 1, with values normal .pmx | 7 | 1455892245368ebeb11c1a5001393784 | 6274755055368eed1116388064384542 | x Web Entry PHP 1 | 898822326536be3a12addb0034537553 | Webservice PHP Description 1 | 1 |
| Web entry PHP task 2, with character special .pmx | 8 | 1455892245368ebeb11c1a5001393784 | 4790702485368efad167477011123879 | x Web Entry PHP 2 @#$%&* | 318701641536be67467eb84048959982 | Webservice PHP Description 2 | 1 |
| Web entry PHP task 3, with we_input_document_access in 0 .pmx | 9 | 1455892245368ebeb11c1a5001393784 | 2072984565368efc137a394001073529 | x Web Entry PHP 3 | 923528807536be661d3d421038593630 | Webservice PHP Description 3 | 0 |
Scenario: Get list Web Entries of a Project after created in this scritp web entries PHP Scenario Outline: Get list Web Entries of a Project after created in this scritp web entries PHP
And I request "project/28733629952e66a362c4f63066393844/web-entries" And I request "project/<project>/web-entries"
And the content type is "application/json" And the content type is "application/json"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "array" And the type is "array"
And the response has 3 records And the response has <records> records
Examples:
| Description | project | records |
| Get list web entry of process .pm | 28733629952e66a362c4f63066393844 | 3 |
| Get list web entry of process .pmx | 1455892245368ebeb11c1a5001393784 | 4 |
Scenario Outline: Get a single Web Entry PHP of a Project Scenario Outline: Get a single Web Entry PHP of a Project
Given that I want to get a resource with the key "we_uid" stored in session array as variable "we_uid_<we_number>" Given that I want to get a resource with the key "we_uid" stored in session array as variable "we_uid_<we_number>"
And I request "project/28733629952e66a362c4f63066393844/web-entry" And I request "project/<project>/web-entry"
And the content type is "application/json" And the content type is "application/json"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
@@ -113,10 +132,13 @@ Scenario Outline: Get a single Web Entry PHP of a Project
Examples: Examples:
| we_number | tas_uid | we_title | dyn_uid | we_description | we_input_document_access | | we_number | project | tas_uid | we_title | dyn_uid | we_description | we_input_document_access |
| 1 | 44199549652e66ba533bb06088252754 | Web Entry PHP 1 | 60308801852e66b7181ae21045247174 | Webservice PHP Description 1 | 1 | | 1 | 28733629952e66a362c4f63066393844 | 44199549652e66ba533bb06088252754 | Web Entry PHP 1 | 60308801852e66b7181ae21045247174 | Webservice PHP Description 1 | 1 |
| 2 | 56118778152e66babcc2103002009439 | Web Entry PHP 2 @#$%&* | 99869771852e66b7dc4b858088901665 | Webservice PHP Description 2 | 1 | | 2 | 28733629952e66a362c4f63066393844 | 56118778152e66babcc2103002009439 | Web Entry PHP 2 @#$%&* | 99869771852e66b7dc4b858088901665 | Webservice PHP Description 2 | 1 |
| 3 | 18096002352e66bc1643af8048493068 | Web Entry PHP 3 | 37977455352e66b892babe6071295002 | Webservice PHP Description 3 | 0 | | 3 | 28733629952e66a362c4f63066393844 | 18096002352e66bc1643af8048493068 | Web Entry PHP 3 | 37977455352e66b892babe6071295002 | Webservice PHP Description 3 | 0 |
| 7 | 1455892245368ebeb11c1a5001393784 | 6274755055368eed1116388064384542 | xWeb Entry PHP 1 | 898822326536be3a12addb0034537553 | Webservice PHP Description 1 | 1 |
| 8 | 1455892245368ebeb11c1a5001393784 | 4790702485368efad167477011123879 | xWeb Entry PHP 2 @#$%&* | 318701641536be67467eb84048959982 | Webservice PHP Description 2 | 1 |
| 9 | 1455892245368ebeb11c1a5001393784 | 2072984565368efc137a394001073529 | xWeb Entry PHP 3 | 923528807536be661d3d421038593630 | Webservice PHP Description 3 | 0 |
Scenario Outline: Update Web Entry PHP Scenario Outline: Update Web Entry PHP
@@ -125,29 +147,30 @@ Scenario Outline: Update Web Entry PHP
{ {
"tas_uid": "<tas_uid>", "tas_uid": "<tas_uid>",
"dyn_uid": "<dyn_uid>", "dyn_uid": "<dyn_uid>",
"usr_uid": "<usr_uid>",
"we_title": "<we_title>", "we_title": "<we_title>",
"we_description": "<we_description>", "we_description": "<we_description>",
"we_method": "<we_method>", "we_method": "WS",
"we_input_document_access": 1 "we_input_document_access": 1
} }
""" """
And that I want to update a resource with the key "we_uid" stored in session array as variable "we_uid_<we_number>" And that I want to update a resource with the key "we_uid" stored in session array as variable "we_uid_<we_number>"
And I request "project/28733629952e66a362c4f63066393844/web-entry" And I request "project/<project>/web-entry"
And the content type is "application/json" And the content type is "application/json"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
Examples: Examples:
| we_number | tas_uid | we_title | dyn_uid | we_description | usr_uid | we_method | | we_number | project | tas_uid | we_title | dyn_uid | we_description | we_input_document_access |
| 1 | 44199549652e66ba533bb06088252754 | Update Web Entry PHP 1 | 60308801852e66b7181ae21045247174 | Update Webservice PHP Description 1 | 00000000000000000000000000000001 | WS | | 1 | 28733629952e66a362c4f63066393844 | 44199549652e66ba533bb06088252754 | Update Web Entry PHP 1 | 60308801852e66b7181ae21045247174 | Update Webservice PHP Description 1 | 1 |
| 2 | 56118778152e66babcc2103002009439 | Update Web Entry PHP 2 @#$%&* | 99869771852e66b7dc4b858088901665 | Update Webservice PHP Description 2 | 00000000000000000000000000000001 | WS | | 2 | 28733629952e66a362c4f63066393844 | 56118778152e66babcc2103002009439 | Update Web Entry PHP 2 @#$%&* | 99869771852e66b7dc4b858088901665 | Update Webservice PHP Description 2 | 1 |
| 7 | 1455892245368ebeb11c1a5001393784 | 6274755055368eed1116388064384542 | xUpdate Web Entry PHP 1 | 898822326536be3a12addb0034537553 | Upadte Webservice PHP Description 1 | 1 |
| 8 | 1455892245368ebeb11c1a5001393784 | 4790702485368efad167477011123879 | xUpdate Web Entry PHP 2 @#$%&* | 318701641536be67467eb84048959982 | Upadte Webservice PHP Description 2 | 1 |
Scenario Outline: Get a single Web Entry PHP of a Project Scenario Outline: Get a single Web Entry PHP of a Project
Given that I want to get a resource with the key "we_uid" stored in session array as variable "we_uid_<we_number>" Given that I want to get a resource with the key "we_uid" stored in session array as variable "we_uid_<we_number>"
And I request "project/28733629952e66a362c4f63066393844/web-entry" And I request "project/<project>/web-entry"
And the content type is "application/json" And the content type is "application/json"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
@@ -158,10 +181,13 @@ Scenario Outline: Get a single Web Entry PHP of a Project
Examples: Examples:
| we_number | tas_uid | we_title | dyn_uid | we_description | usr_uid | we_method | | we_number | project | tas_uid | we_title | dyn_uid | we_description | usr_uid | we_method |
| 1 | 44199549652e66ba533bb06088252754 | Update Web Entry PHP 1 | 60308801852e66b7181ae21045247174 | Update Webservice PHP Description 1 | 00000000000000000000000000000001 | WS | | 1 | 28733629952e66a362c4f63066393844 | 44199549652e66ba533bb06088252754 | Update Web Entry PHP 1 | 60308801852e66b7181ae21045247174 | Update Webservice PHP Description 1 | 00000000000000000000000000000001 | WS |
| 2 | 56118778152e66babcc2103002009439 | Update Web Entry PHP 2 @#$%&* | 99869771852e66b7dc4b858088901665 | Update Webservice PHP Description 2 | 00000000000000000000000000000001 | WS | | 2 | 28733629952e66a362c4f63066393844 | 56118778152e66babcc2103002009439 | Update Web Entry PHP 2 @#$%&* | 99869771852e66b7dc4b858088901665 | Update Webservice PHP Description 2 | 00000000000000000000000000000001 | WS |
| 3 | 18096002352e66bc1643af8048493068 | Web Entry PHP 3 | 37977455352e66b892babe6071295002 | Webservice PHP Description 3 | 00000000000000000000000000000001 | WS | | 3 | 28733629952e66a362c4f63066393844 | 18096002352e66bc1643af8048493068 | Web Entry PHP 3 | 37977455352e66b892babe6071295002 | Webservice PHP Description 3 | 00000000000000000000000000000001 | WS |
| 7 | 1455892245368ebeb11c1a5001393784 | 6274755055368eed1116388064384542 | xUpdate Web Entry PHP 1 | 898822326536be3a12addb0034537553 | Upadte Webservice PHP Description 1 | 00000000000000000000000000000001 | WS |
| 8 | 1455892245368ebeb11c1a5001393784 | 4790702485368efad167477011123879 | xUpdate Web Entry PHP 2 @#$%&* | 318701641536be67467eb84048959982 | Upadte Webservice PHP Description 2 | 00000000000000000000000000000001 | WS |
| 9 | 1455892245368ebeb11c1a5001393784 | 2072984565368efc137a394001073529 | xWeb Entry PHP 3 | 923528807536be661d3d421038593630 | Webservice PHP Description 3 | 00000000000000000000000000000001 | WS |
Scenario Outline: Update Web Entry, when we_method is change a other method of the register 3 Scenario Outline: Update Web Entry, when we_method is change a other method of the register 3
@@ -294,7 +320,7 @@ Scenario Outline: Get a single Web Entry HTML of a Project
Scenario Outline: Delete a Web Entry of a Project Scenario Outline: Delete a Web Entry of a Project
Given that I want to delete a resource with the key "we_uid" stored in session array as variable "we_uid_<we_number>" Given that I want to delete a resource with the key "we_uid" stored in session array as variable "we_uid_<we_number>"
And I request "project/28733629952e66a362c4f63066393844/web-entry" And I request "project/<project>/web-entry"
And the content type is "application/json" And the content type is "application/json"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
@@ -302,22 +328,31 @@ Scenario Outline: Delete a Web Entry of a Project
Examples: Examples:
| we_number | | project | we_number |
| 1 | | 28733629952e66a362c4f63066393844 | 1 |
| 2 | | 28733629952e66a362c4f63066393844 | 2 |
| 3 | | 28733629952e66a362c4f63066393844 | 3 |
| 4 | | 28733629952e66a362c4f63066393844 | 4 |
| 5 | | 28733629952e66a362c4f63066393844 | 5 |
| 6 | | 28733629952e66a362c4f63066393844 | 6 |
| 1455892245368ebeb11c1a5001393784 | 7 |
| 1455892245368ebeb11c1a5001393784 | 8 |
| 1455892245368ebeb11c1a5001393784 | 9 |
Scenario: Get list Web Entries of a Project Scenario Outline: Get list Web Entries of a Project
And I request "project/28733629952e66a362c4f63066393844/web-entries" And I request "project/<project>/web-entries"
And the content type is "application/json" And the content type is "application/json"
Then the response status code should be 200 Then the response status code should be 200
And the response charset is "UTF-8" And the response charset is "UTF-8"
And the type is "array" And the type is "array"
And the response has 0 records And the response has <records> records
Examples:
| Description | project | records |
| Get list web entry of process .pm | 28733629952e66a362c4f63066393844 | 0 |
| Get list web entry of process .pmx | 1455892245368ebeb11c1a5001393784 | 1 |
#WEB ENTRY - END #WEB ENTRY - END

View File

@@ -112,7 +112,7 @@ class WebApplication
list($this->requestUri,) = explode('?', $this->requestUri); list($this->requestUri,) = explode('?', $this->requestUri);
$uriParts = explode('/', $this->requestUri); $uriParts = explode('/', $this->requestUri);
if ($uriParts[2] == 'oauth2') { if (isset($uriParts[2]) && $uriParts[2] == "oauth2") {
return self::RUNNING_OAUTH2; return self::RUNNING_OAUTH2;
} else { } else {
return self::RUNNING_WORKFLOW; return self::RUNNING_WORKFLOW;

View File

@@ -3308,9 +3308,9 @@ var validateForm = function(sRequiredFields) {
} }
} }
var arrayForm = document.getElementsByTagName("form"); arrayForm = document.getElementsByTagName("form");
var i1 = 0; i1 = 0;
var i2 = 0; i2 = 0;
for (i1 = 0; i1 <= arrayForm.length - 1; i1++) { for (i1 = 0; i1 <= arrayForm.length - 1; i1++) {
var frm = arrayForm[i1]; var frm = arrayForm[i1];
@@ -3318,14 +3318,14 @@ var validateForm = function(sRequiredFields) {
var arrayInput = frm.getElementsByTagName("input"); var arrayInput = frm.getElementsByTagName("input");
for (i2 = 0; i2 <= arrayInput.length - 1; i2++) { for (i2 = 0; i2 <= arrayInput.length - 1; i2++) {
var input = arrayInput[i2]; var inputAux2 = arrayInput[i2];
if (input.type == "file") { if (inputAux2.type == "file") {
if (input.value != "") { if (inputAux2.value != "") {
var pmindocmaxfilesize = input.getAttribute("pmindocmaxfilesize"); var pmindocmaxfilesize = inputAux2.getAttribute("pmindocmaxfilesize");
if (pmindocmaxfilesize != null && pmindocmaxfilesize != "" && pmindocmaxfilesize > 0) { if (pmindocmaxfilesize != null && pmindocmaxfilesize != "" && pmindocmaxfilesize > 0) {
var flagFilesize = inputDocumentVerifySize(parseInt(pmindocmaxfilesize), input); var flagFilesize = inputDocumentVerifySize(parseInt(pmindocmaxfilesize), inputAux2);
if (flagFilesize == 0) { if (flagFilesize == 0) {
new leimnud.module.app.alert().make({label: _("ID_SIZE_VERY_LARGE_PERMITTED")}); new leimnud.module.app.alert().make({label: _("ID_SIZE_VERY_LARGE_PERMITTED")});

View File

@@ -1241,7 +1241,7 @@ if(fielEmailInvalid.length>0){systemMessaggeInvalid+="\n \n"+G_STRINGS.ID_VALIDA
alert(systemMessaggeInvalid);swSubmitValidateForm=1;return false;} alert(systemMessaggeInvalid);swSubmitValidateForm=1;return false;}
else{var arrayForm=document.getElementsByTagName("form");var inputAux;var id="";var i1=0;var i2=0;for(i1=0;i1<=arrayForm.length-1;i1++){var frm=arrayForm[i1];for(i2=0;i2<=frm.elements.length-1;i2++){var elem=frm.elements[i2];if(elem.type=="checkbox"&&elem.disabled&&elem.checked){id=elem.id+"_";if(!document.getElementById(id)){inputAux=document.createElement("input");inputAux.type="hidden";inputAux.id=id;inputAux.name=elem.name;inputAux.value=elem.value;frm.appendChild(inputAux);}}} else{var arrayForm=document.getElementsByTagName("form");var inputAux;var id="";var i1=0;var i2=0;for(i1=0;i1<=arrayForm.length-1;i1++){var frm=arrayForm[i1];for(i2=0;i2<=frm.elements.length-1;i2++){var elem=frm.elements[i2];if(elem.type=="checkbox"&&elem.disabled&&elem.checked){id=elem.id+"_";if(!document.getElementById(id)){inputAux=document.createElement("input");inputAux.type="hidden";inputAux.id=id;inputAux.name=elem.name;inputAux.value=elem.value;frm.appendChild(inputAux);}}}
var arrayLink=frm.getElementsByTagName("a");for(i2=0;i2<=arrayLink.length-1;i2++){var link=arrayLink[i2];if(typeof link.id!="undefined"&&link.id!=""&&link.id!="form[DYN_BACKWARD]"&&link.id!="form[DYN_FORWARD]"){var strHtml=link.parentNode.innerHTML;strHtml=stringReplace("\\x0A","",strHtml);strHtml=stringReplace("\\x0D","",strHtml);strHtml=stringReplace("\\x09","",strHtml);if(/^.*pm:field.*$/.test(strHtml)){id=link.id+"_";if(!document.getElementById(id)){var strAux=link.id.replace("form[","");strAux=strAux.substring(0,strAux.length-1);inputAux=document.createElement("input");inputAux.type="hidden";inputAux.id=id;inputAux.name=link.id;inputAux.value=link.href;frm.appendChild(inputAux);inputAux=document.createElement("input");inputAux.type="hidden";inputAux.id=id+"label";inputAux.name="form["+strAux+"_label]";inputAux.value=link.innerHTML;frm.appendChild(inputAux);}}}}} var arrayLink=frm.getElementsByTagName("a");for(i2=0;i2<=arrayLink.length-1;i2++){var link=arrayLink[i2];if(typeof link.id!="undefined"&&link.id!=""&&link.id!="form[DYN_BACKWARD]"&&link.id!="form[DYN_FORWARD]"){var strHtml=link.parentNode.innerHTML;strHtml=stringReplace("\\x0A","",strHtml);strHtml=stringReplace("\\x0D","",strHtml);strHtml=stringReplace("\\x09","",strHtml);if(/^.*pm:field.*$/.test(strHtml)){id=link.id+"_";if(!document.getElementById(id)){var strAux=link.id.replace("form[","");strAux=strAux.substring(0,strAux.length-1);inputAux=document.createElement("input");inputAux.type="hidden";inputAux.id=id;inputAux.name=link.id;inputAux.value=link.href;frm.appendChild(inputAux);inputAux=document.createElement("input");inputAux.type="hidden";inputAux.id=id+"label";inputAux.name="form["+strAux+"_label]";inputAux.value=link.innerHTML;frm.appendChild(inputAux);}}}}}
var arrayForm=document.getElementsByTagName("form");var i1=0;var i2=0;for(i1=0;i1<=arrayForm.length-1;i1++){var frm=arrayForm[i1];var arrayInput=frm.getElementsByTagName("input");for(i2=0;i2<=arrayInput.length-1;i2++){var input=arrayInput[i2];if(input.type=="file"){if(input.value!=""){var pmindocmaxfilesize=input.getAttribute("pmindocmaxfilesize");if(pmindocmaxfilesize!=null&&pmindocmaxfilesize!=""&&pmindocmaxfilesize>0){var flagFilesize=inputDocumentVerifySize(parseInt(pmindocmaxfilesize),input);if(flagFilesize==0){new leimnud.module.app.alert().make({label:_("ID_SIZE_VERY_LARGE_PERMITTED")});swSubmitValidateForm=1;return false;}}}}}} arrayForm=document.getElementsByTagName("form");i1=0;i2=0;for(i1=0;i1<=arrayForm.length-1;i1++){var frm=arrayForm[i1];var arrayInput=frm.getElementsByTagName("input");for(i2=0;i2<=arrayInput.length-1;i2++){var inputAux2=arrayInput[i2];if(inputAux2.type=="file"){if(inputAux2.value!=""){var pmindocmaxfilesize=inputAux2.getAttribute("pmindocmaxfilesize");if(pmindocmaxfilesize!=null&&pmindocmaxfilesize!=""&&pmindocmaxfilesize>0){var flagFilesize=inputDocumentVerifySize(parseInt(pmindocmaxfilesize),inputAux2);if(flagFilesize==0){new leimnud.module.app.alert().make({label:_("ID_SIZE_VERY_LARGE_PERMITTED")});swSubmitValidateForm=1;return false;}}}}}}
return true;}}else{return false;}};var getObject=function(sObject){var i;var oAux=null;var iLength=__aObjects__.length;for(i=0;i<iLength;i++){oAux=__aObjects__[i].getElementByName(sObject);if(oAux){return oAux;}} return true;}}else{return false;}};var getObject=function(sObject){var i;var oAux=null;var iLength=__aObjects__.length;for(i=0;i<iLength;i++){oAux=__aObjects__[i].getElementByName(sObject);if(oAux){return oAux;}}
return oAux;};var saveAndRefreshForm=function(oObject){if(oObject){oObject.form.action+='&_REFRESH_=1';oObject.form.submit();} return oAux;};var saveAndRefreshForm=function(oObject){if(oObject){oObject.form.action+='&_REFRESH_=1';oObject.form.submit();}
else{var oAux=window.document.getElementsByTagName('form');if(oAux.length>0){oAux[0].action+='&_REFRESH_=1';oAux[0].submit();}}};var sessionPersits=function(){var rpc=new leimnud.module.rpc.xmlhttp({url:'../services/sessionPersists',args:'dynaformRestoreValues='+(typeof(__dynaformSVal__)!='undefined'?__dynaformSVal__:''),async:false});rpc.make();var response=rpc.xmlhttp.responseText.parseJSON();return response.status;};var showPromptLogin=function(lastAction){lastActionPerformed=lastAction;promptPanel=new leimnud.module.panel();promptPanel.options={statusBarButtons:[{value:_('LOGIN')}],position:{center:true},size:{w:300,h:130},control:{close:false,resize:false},fx:{modal:true}};promptPanel.setStyle={content:{padding:10,paddingBottom:2,textAlign:'left',paddingLeft:50,backgroundRepeat:'no-repeat',backgroundPosition:'10 50%',backgroundColor:'transparent',borderWidth:0}};promptPanel.make();promptPanel.addContent(_('ID_DYNAFORM_EDITOR_LOGIN_AGAIN'));promptPanel.addContent('<br />');var thePassword=$dce('input');thePassword.type='password';thePassword.id='thePassword';leimnud.dom.setStyle(thePassword,{font:'normal 8pt Tahoma,MiscFixed',color:'#000',width:'100%',marginTop:3,backgroundColor:'white',border:'1px solid #919B9C'});promptPanel.addContent(thePassword);thePassword.focus();thePassword.onkeyup=function(evt) else{var oAux=window.document.getElementsByTagName('form');if(oAux.length>0){oAux[0].action+='&_REFRESH_=1';oAux[0].submit();}}};var sessionPersits=function(){var rpc=new leimnud.module.rpc.xmlhttp({url:'../services/sessionPersists',args:'dynaformRestoreValues='+(typeof(__dynaformSVal__)!='undefined'?__dynaformSVal__:''),async:false});rpc.make();var response=rpc.xmlhttp.responseText.parseJSON();return response.status;};var showPromptLogin=function(lastAction){lastActionPerformed=lastAction;promptPanel=new leimnud.module.panel();promptPanel.options={statusBarButtons:[{value:_('LOGIN')}],position:{center:true},size:{w:300,h:130},control:{close:false,resize:false},fx:{modal:true}};promptPanel.setStyle={content:{padding:10,paddingBottom:2,textAlign:'left',paddingLeft:50,backgroundRepeat:'no-repeat',backgroundPosition:'10 50%',backgroundColor:'transparent',borderWidth:0}};promptPanel.make();promptPanel.addContent(_('ID_DYNAFORM_EDITOR_LOGIN_AGAIN'));promptPanel.addContent('<br />');var thePassword=$dce('input');thePassword.type='password';thePassword.id='thePassword';leimnud.dom.setStyle(thePassword,{font:'normal 8pt Tahoma,MiscFixed',color:'#000',width:'100%',marginTop:3,backgroundColor:'white',border:'1px solid #919B9C'});promptPanel.addContent(thePassword);thePassword.focus();thePassword.onkeyup=function(evt)

View File

@@ -2860,29 +2860,60 @@ class Bootstrap
} }
} }
public function hasPassword($pass, $previous=false) { public function getPasswordHashConfig()
$passEncrypt = md5($pass); {
try { G::LoadClass('configuration');
require_once PATH_CORE .'methods' . PATH_SEP .'enterprise/enterprise.php'; $config= new Configurations();
$passEncrypt = enterprisePlugin::hashPassword($pass, $previous); $passwordHashConfig = $config->getConfiguration('ENTERPRISE_SETTING_ENCRYPT', '');
} catch (Exception $e) { if (!is_null($passwordHashConfig)) {
if (!is_array($passwordHashConfig)) {
$passwordHashConfig = array();
}
if (!isset($passwordHashConfig['current'])) {
$passwordHashConfig['current'] = 'md5';
}
if (!isset($passwordHashConfig['previous'])) {
$passwordHashConfig['previous'] = 'md5';
}
} else {
$passwordHashConfig = array('current' => 'md5', 'previous' => 'md5');
}
return $passwordHashConfig;
} }
return $passEncrypt; public function getPasswordHashType()
{
$passwordHashConfig = Bootstrap::getPasswordHashConfig();
return $passwordHashConfig['current'];
}
public function hashPassword($pass, $hashType = '', $includeHashType = false)
{
if ($hashType == '') {
$hashType = Bootstrap::getPasswordHashType();
}
eval("\$var = hash('" . $hashType . "', '" . $pass . "');");
if ($includeHashType) {
$var = $hashType . ':' . $var;
}
return $var;
} }
public function verifyHashPassword ($pass, $userPass) public function verifyHashPassword ($pass, $userPass)
{ {
//$verify = Bootstrap::hasPassword($pass); $passwordHashConfig = Bootstrap::getPasswordHashConfig();
if (Bootstrap::hasPassword($pass) == $userPass) { $hashTypeCurrent = $passwordHashConfig['current'];
$hashTypePrevious = $passwordHashConfig['previous'];
if ((Bootstrap::hashPassword($pass, $hashTypeCurrent) == $userPass) || ($pass === $hashTypeCurrent . ':' . $userPass)) {
return true; return true;
} }
if (Bootstrap::hasPassword($pass, true) == $userPass) { if ((Bootstrap::hashPassword($pass, $hashTypePrevious) == $userPass) || ($pass === $hashTypePrevious . ':' . $userPass)) {
return true; return true;
} }
return false; return false;
} }
} }

View File

@@ -103,7 +103,7 @@ class Logger
{ {
$this->renameFile(); $this->renameFile();
$file = fopen($this->filePath, "a+"); $file = fopen($this->filePath, "a+");
$message = date('Y-m-d H:i:s') . " " . $message; $message = date('Y-m-d H:i:s') . " " . $message . "\n";
fwrite($file, $message); fwrite($file, $message);
fclose($file); fclose($file);
} }

View File

@@ -950,7 +950,7 @@ function saveLog($sSource, $sType, $sDescription)
} }
G::verifyPath(PATH_DATA . "log" . PATH_SEP, true); G::verifyPath(PATH_DATA . "log" . PATH_SEP, true);
G::log("| $sObject | " . $sSource . " | $sType | " . $sDescription . "\n", PATH_DATA); G::log("| $sObject | " . $sSource . " | $sType | " . $sDescription, PATH_DATA);
} catch (Exception $e) { } catch (Exception $e) {
//CONTINUE //CONTINUE
} }

View File

@@ -350,7 +350,7 @@ function saveLog($sSource, $sType, $sDescription)
print date ('H:i:s') . " ($sSource) $sType $sDescription <br>\n"; print date ('H:i:s') . " ($sSource) $sType $sDescription <br>\n";
G::verifyPath (PATH_DATA . 'log' . PATH_SEP, true); G::verifyPath (PATH_DATA . 'log' . PATH_SEP, true);
$message = '(' . $sSource . ') ' . $sDescription . "\n"; $message = '(' . $sSource . ') ' . $sDescription;
if ($sType == 'action') { if ($sType == 'action') {
G::log($message, PATH_DATA); G::log($message, PATH_DATA);
} }

View File

@@ -499,7 +499,7 @@ function saveLog($sSource, $sType, $sDescription)
print date ('H:i:s') . " ($sSource) $sType $sDescription <br>\n"; print date ('H:i:s') . " ($sSource) $sType $sDescription <br>\n";
G::verifyPath (PATH_DATA . 'log' . PATH_SEP, true); G::verifyPath (PATH_DATA . 'log' . PATH_SEP, true);
$message = '(' . $sSource . ') ' . $sDescription . "\n"; $message = '(' . $sSource . ') ' . $sDescription;
if ($sType == 'action') { if ($sType == 'action') {
G::log($message, PATH_DATA); G::log($message, PATH_DATA);
} }

View File

@@ -378,7 +378,7 @@ function evaluateFunction ($aGrid, $sExpresion)
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#WSLogin.28.29 * @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#WSLogin.28.29
* *
* @param string(32) | $user | Username of the user | The username of the user who will login to ProcessMaker. All subsequent actions will be limited to the permissions of that user. * @param string(32) | $user | Username of the user | The username of the user who will login to ProcessMaker. All subsequent actions will be limited to the permissions of that user.
* @param string(32) | $pass | Password encrypted | The user's password encrypted as an MD5 hash with 'md5:' prepended. * @param string(32) | $pass | Password encrypted | The user's password encrypted as an MD5 or SHA256 hash with '{hashType}:' prepended.
* @param string(32) | $endpoint="" | URI of the WSDL | The URI (address) of the WSDL definition of the ProcessMaker web services. * @param string(32) | $endpoint="" | URI of the WSDL | The URI (address) of the WSDL definition of the ProcessMaker web services.
* @return string | $unique ID | Unique Id |The unique ID for the initiated session. * @return string | $unique ID | Unique Id |The unique ID for the initiated session.
* *

View File

@@ -1189,7 +1189,7 @@ class wsBase
$arrayData = array (); $arrayData = array ();
$arrayData["USR_USERNAME"] = $userName; $arrayData["USR_USERNAME"] = $userName;
$arrayData["USR_PASSWORD"] = Bootstrap::hasPassword( $password ); $arrayData["USR_PASSWORD"] = Bootstrap::hashPassword( $password );
$arrayData["USR_FIRSTNAME"] = $firstName; $arrayData["USR_FIRSTNAME"] = $firstName;
$arrayData["USR_LASTNAME"] = $lastName; $arrayData["USR_LASTNAME"] = $lastName;
$arrayData["USR_EMAIL"] = $email; $arrayData["USR_EMAIL"] = $email;
@@ -1380,7 +1380,7 @@ class wsBase
} }
if (! empty( $password )) { if (! empty( $password )) {
$arrayData["USR_PASSWORD"] = Bootstrap::hasPassword( $password ); $arrayData["USR_PASSWORD"] = Bootstrap::hashPassword( $password );
} }
//Update user //Update user

View File

@@ -229,14 +229,16 @@ class workspaceTools
* $matches will contain several groups: * $matches will contain several groups:
* ((define('(<key>)2', ')1 (<value>)3 (');)4 )0 * ((define('(<key>)2', ')1 (<value>)3 (');)4 )0
*/ */
$dbPrefix = array('DB_NAME' => 'wf_', 'DB_USER' => 'wf_', 'DB_RBAC_NAME' => 'wf_', 'DB_RBAC_USER' => 'wf_', 'DB_REPORT_NAME' => 'wf_', 'DB_REPORT_USER' => 'wf_');
$key = isset($matches['key']) ? $matches['key'] : $matches[2]; $key = isset($matches['key']) ? $matches['key'] : $matches[2];
$value = isset($matches['value']) ? $matches['value'] : $matches[3]; $value = isset($matches['value']) ? $matches['value'] : $matches[3];
if (!$this->onedb) { if($this->onedb){
$dbPrefix = array('DB_NAME' => 'wf_', 'DB_USER' => 'wf_', 'DB_RBAC_NAME' => 'wf_', 'DB_RBAC_USER' => 'wf_', 'DB_REPORT_NAME' => 'wf_', 'DB_REPORT_USER' => 'wf_');
if (array_search($key, array('DB_PASS', 'DB_RBAC_PASS', 'DB_REPORT_PASS'))) { if (array_search($key, array('DB_PASS', 'DB_RBAC_PASS', 'DB_REPORT_PASS'))) {
$value = $this->dbInfo['DB_PASS']; $value = $this->dbInfo['DB_PASS'];
} }
} else{
$dbPrefix = array('DB_NAME' => 'wf_', 'DB_USER' => 'wf_', 'DB_RBAC_NAME' => 'rb_', 'DB_RBAC_USER' => 'rb_', 'DB_REPORT_NAME' => 'rp_', 'DB_REPORT_USER' => 'rp_');
} }
if (array_search($key, array('DB_HOST', 'DB_RBAC_HOST', 'DB_REPORT_HOST')) !== false) { if (array_search($key, array('DB_HOST', 'DB_RBAC_HOST', 'DB_REPORT_HOST')) !== false) {
@@ -1260,6 +1262,7 @@ class workspaceTools
$lines = explode("\n", $script); $lines = explode("\n", $script);
$previous = null; $previous = null;
$insert = false;
foreach ($lines as $j => $line) { foreach ($lines as $j => $line) {
// Remove comments from the script // Remove comments from the script
$line = trim($line); $line = trim($line);
@@ -1284,6 +1287,7 @@ class workspaceTools
$line = substr($line, 0, strrpos($line, ";")); $line = substr($line, 0, strrpos($line, ";"));
if (strrpos($line, "INSERT INTO") !== false) { if (strrpos($line, "INSERT INTO") !== false) {
$insert = true;
if ($insert) { if ($insert) {
$result = mysql_query("START TRANSACTION"); $result = mysql_query("START TRANSACTION");
$insert = false; $insert = false;
@@ -1353,7 +1357,7 @@ class workspaceTools
$chmod = @chmod($filename, $perms); $chmod = @chmod($filename, $perms);
if ($chgrp === false || $chmod === false || $chown === false) { if ($chgrp === false || $chmod === false || $chown === false) {
if (strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN') { if (strtoupper( substr( PHP_OS, 0, 3 ) ) === 'WIN') {
exec( 'icacls ' . $dirNameWin . '/grant Administrador:(D,WDAC) /T', $res ); exec( 'icacls ' . $filename . '/grant Administrador:(D,WDAC) /T', $res );
} else { } else {
CLI::logging(CLI::error("Failed to set permissions for $filename") . "\n"); CLI::logging(CLI::error("Failed to set permissions for $filename") . "\n");
} }
@@ -1502,7 +1506,7 @@ class workspaceTools
$versionOld = ( isset($version[0])) ? $version[0] : ''; $versionOld = ( isset($version[0])) ? $version[0] : '';
CLI::logging(CLI::info("$versionOld < $versionPresent") . "\n"); CLI::logging(CLI::info("$versionOld < $versionPresent") . "\n");
if ( $versionOld < $versionPresent) { if ( $versionOld < $versionPresent || strpos($versionPresent, "Branch")) {
$start = microtime(true); $start = microtime(true);
CLI::logging("> Updating database...\n"); CLI::logging("> Updating database...\n");
$workspace->upgradeDatabase(); $workspace->upgradeDatabase();
@@ -1649,7 +1653,7 @@ class workspaceTools
$pathDirectoryEnterprise = PATH_CORE . 'plugins' . PATH_SEP . 'enterprise'; $pathDirectoryEnterprise = PATH_CORE . 'plugins' . PATH_SEP . 'enterprise';
$pathFileEnterprise = PATH_CORE . 'plugins' . PATH_SEP . 'enterprise.php'; $pathFileEnterprise = PATH_CORE . 'plugins' . PATH_SEP . 'enterprise.php';
if (!file_exists($pathDirectoryEnterprise) && !file_exists(PATH_PLUGIN . 'enterprise.php')) { if (!file_exists($pathDirectoryEnterprise) && !file_exists($pathFileEnterprise)) {
CLI::logging(" Without changes... \n"); CLI::logging(" Without changes... \n");
return true; return true;
} }

View File

@@ -338,7 +338,7 @@ class CaseScheduler extends BaseCaseScheduler
$processId = $aRow["PRO_UID"]; $processId = $aRow["PRO_UID"];
$taskId = $aRow["TAS_UID"]; $taskId = $aRow["TAS_UID"];
$client = new SoapClient( $defaultEndpoint ); $client = new SoapClient( $defaultEndpoint );
$params = array ('userid' => $user,'password' => 'md5:' . $pass); $params = array ('userid' => $user,'password' => Bootstrap::getPasswordHashType() . ':' . $pass);
$result = $client->__SoapCall( 'login', array ($params) ); $result = $client->__SoapCall( 'login', array ($params) );
eprint( " - Logging as user $user............." ); eprint( " - Logging as user $user............." );
if ($result->status_code == 0) { if ($result->status_code == 0) {
@@ -500,7 +500,7 @@ class CaseScheduler extends BaseCaseScheduler
$processId = $aRow["PRO_UID"]; $processId = $aRow["PRO_UID"];
$taskId = $aRow["TAS_UID"]; $taskId = $aRow["TAS_UID"];
$client = new SoapClient( $defaultEndpoint ); $client = new SoapClient( $defaultEndpoint );
$params = array ('userid' => $user,'password' => 'md5:' . $pass); $params = array ('userid' => $user,'password' => Bootstrap::getPasswordHashType() . ':' . $pass);
$result = $client->__SoapCall( 'login', array ($params) ); $result = $client->__SoapCall( 'login', array ($params) );
eprint( " - Logging as user $user............." ); eprint( " - Logging as user $user............." );
if ($result->status_code == 0) { if ($result->status_code == 0) {

View File

@@ -601,7 +601,7 @@ class Process extends BaseProcess
} }
} }
public function getAllProcesses ($start, $limit, $category = null, $processName = null, $counters = true, $reviewSubProcess = false) public function getAllProcesses ($start, $limit, $category = null, $processName = null, $counters = true, $reviewSubProcess = false, $userLogged = "")
{ {
require_once PATH_RBAC . "model/RbacUsers.php"; require_once PATH_RBAC . "model/RbacUsers.php";
require_once "classes/model/ProcessCategory.php"; require_once "classes/model/ProcessCategory.php";
@@ -642,10 +642,13 @@ class Process extends BaseProcess
$oCriteria->addJoin( ProcessPeer::PRO_CREATE_USER, UsersPeer::USR_UID, Criteria::LEFT_JOIN ); $oCriteria->addJoin( ProcessPeer::PRO_CREATE_USER, UsersPeer::USR_UID, Criteria::LEFT_JOIN );
$oCriteria->addJoin( ProcessPeer::PRO_CATEGORY, ProcessCategoryPeer::CATEGORY_UID, Criteria::LEFT_JOIN ); $oCriteria->addJoin( ProcessPeer::PRO_CATEGORY, ProcessCategoryPeer::CATEGORY_UID, Criteria::LEFT_JOIN );
if ($userLogged != "") {
$oCriteria->add( $oCriteria->add(
$oCriteria->getNewCriterion(ProcessPeer::PRO_TYPE_PROCESS, "PUBLIC", Criteria::EQUAL)->addOr( $oCriteria->getNewCriterion(ProcessPeer::PRO_TYPE_PROCESS, "PUBLIC", Criteria::EQUAL)->addOr(
$oCriteria->getNewCriterion(ProcessPeer::PRO_CREATE_USER, $_SESSION["USER_LOGGED"], Criteria::EQUAL)) $oCriteria->getNewCriterion(ProcessPeer::PRO_CREATE_USER, $userLogged, Criteria::EQUAL))
); );
}
$this->tmpCriteria = clone $oCriteria; $this->tmpCriteria = clone $oCriteria;

View File

@@ -3245,7 +3245,7 @@
<column name="PRJ_AUTHOR" type="LONGVARCHAR" required="false"/> <column name="PRJ_AUTHOR" type="LONGVARCHAR" required="false"/>
<column name="PRJ_AUTHOR_VERSION" type="LONGVARCHAR" required="false"/> <column name="PRJ_AUTHOR_VERSION" type="LONGVARCHAR" required="false"/>
<column name="PRJ_ORIGINAL_SOURCE" type="LONGVARCHAR" required="false"/> <column name="PRJ_ORIGINAL_SOURCE" type="LONGVARCHAR" required="false"/>
<index> <index name="BPMN_PROJECT_I_1">
<index-column name="PRJ_UID"/> <index-column name="PRJ_UID"/>
</index> </index>
</table> </table>
@@ -3274,10 +3274,10 @@
<foreign-key name="fk_bpmn_process_project" foreignTable="BPMN_PROJECT"> <foreign-key name="fk_bpmn_process_project" foreignTable="BPMN_PROJECT">
<reference local="PRJ_UID" foreign="PRJ_UID"/> <reference local="PRJ_UID" foreign="PRJ_UID"/>
</foreign-key> </foreign-key>
<index> <index name="BPMN_PROCESS_I_1">
<index-column name="PRO_UID"/> <index-column name="PRO_UID"/>
</index> </index>
<index> <index name="BPMN_PROCESS_I_2">
<index-column name="PRJ_UID"/> <index-column name="PRJ_UID"/>
</index> </index>
</table> </table>
@@ -3331,13 +3331,13 @@
<foreign-key name="fk_bpmn_activity_process" foreignTable="BPMN_PROCESS"> <foreign-key name="fk_bpmn_activity_process" foreignTable="BPMN_PROCESS">
<reference local="PRO_UID" foreign="PRO_UID"/> <reference local="PRO_UID" foreign="PRO_UID"/>
</foreign-key> </foreign-key>
<index> <index name="BPMN_ACTIVITY_I_1">
<index-column name="ACT_UID"/> <index-column name="ACT_UID"/>
</index> </index>
<index> <index name="BPMN_ACTIVITY_I_2">
<index-column name="PRJ_UID"/> <index-column name="PRJ_UID"/>
</index> </index>
<index> <index name="BPMN_ACTIVITY_I_3">
<index-column name="PRO_UID"/> <index-column name="PRO_UID"/>
</index> </index>
</table> </table>
@@ -3367,13 +3367,13 @@
<foreign-key name="fk_bpmn_artifact_process" foreignTable="BPMN_PROCESS"> <foreign-key name="fk_bpmn_artifact_process" foreignTable="BPMN_PROCESS">
<reference local="PRO_UID" foreign="PRO_UID"/> <reference local="PRO_UID" foreign="PRO_UID"/>
</foreign-key> </foreign-key>
<index> <index name="BPMN_ARTIFACT_I_1">
<index-column name="ART_UID"/> <index-column name="ART_UID"/>
</index> </index>
<index> <index name="BPMN_ARTIFACT_I_2">
<index-column name="PRJ_UID"/> <index-column name="PRJ_UID"/>
</index> </index>
<index> <index name="BPMN_ARTIFACT_I_3">
<index-column name="PRO_UID"/> <index-column name="PRO_UID"/>
</index> </index>
</table> </table>
@@ -3398,10 +3398,10 @@
<foreign-key name="fk_bpmn_diagram_project" foreignTable="BPMN_PROJECT"> <foreign-key name="fk_bpmn_diagram_project" foreignTable="BPMN_PROJECT">
<reference local="PRJ_UID" foreign="PRJ_UID"/> <reference local="PRJ_UID" foreign="PRJ_UID"/>
</foreign-key> </foreign-key>
<index> <index name="BPMN_DIAGRAM_I_1">
<index-column name="DIA_UID"/> <index-column name="DIA_UID"/>
</index> </index>
<index> <index name="BPMN_DIAGRAM_I_2">
<index-column name="PRJ_UID"/> <index-column name="PRJ_UID"/>
</index> </index>
</table> </table>
@@ -3438,13 +3438,13 @@
<foreign-key name="fk_bpmn_bound_diagram" foreignTable="BPMN_DIAGRAM"> <foreign-key name="fk_bpmn_bound_diagram" foreignTable="BPMN_DIAGRAM">
<reference local="DIA_UID" foreign="DIA_UID"/> <reference local="DIA_UID" foreign="DIA_UID"/>
</foreign-key> </foreign-key>
<index> <index name="BPMN_BOUND_I_1">
<index-column name="BOU_UID"/> <index-column name="BOU_UID"/>
</index> </index>
<index> <index name="BPMN_BOUND_I_2">
<index-column name="PRJ_UID"/> <index-column name="PRJ_UID"/>
</index> </index>
<index> <index name="BPMN_BOUND_I_3">
<index-column name="DIA_UID"/> <index-column name="DIA_UID"/>
</index> </index>
</table> </table>
@@ -3480,13 +3480,13 @@
<foreign-key name="fk_bpmn_data_project" foreignTable="BPMN_PROJECT"> <foreign-key name="fk_bpmn_data_project" foreignTable="BPMN_PROJECT">
<reference local="PRJ_UID" foreign="PRJ_UID"/> <reference local="PRJ_UID" foreign="PRJ_UID"/>
</foreign-key> </foreign-key>
<index> <index name="BPMN_DATA_I_1">
<index-column name="DAT_UID"/> <index-column name="DAT_UID"/>
</index> </index>
<index> <index name="BPMN_DATA_I_2">
<index-column name="PRJ_UID"/> <index-column name="PRJ_UID"/>
</index> </index>
<index> <index name="BPMN_DATA_I_3">
<index-column name="PRO_UID"/> <index-column name="PRO_UID"/>
</index> </index>
</table> </table>
@@ -3533,13 +3533,13 @@
<foreign-key name="fk_bpmn_event_process" foreignTable="BPMN_PROCESS"> <foreign-key name="fk_bpmn_event_process" foreignTable="BPMN_PROCESS">
<reference local="PRO_UID" foreign="PRO_UID"/> <reference local="PRO_UID" foreign="PRO_UID"/>
</foreign-key> </foreign-key>
<index> <index name="BPMN_EVENT_I_1">
<index-column name="EVN_UID"/> <index-column name="EVN_UID"/>
</index> </index>
<index> <index name="BPMN_EVENT_I_2">
<index-column name="PRJ_UID"/> <index-column name="PRJ_UID"/>
</index> </index>
<index> <index name="BPMN_EVENT_I_3">
<index-column name="PRO_UID"/> <index-column name="PRO_UID"/>
</index> </index>
</table> </table>
@@ -3581,13 +3581,13 @@
<foreign-key name="fk_bpmn_flow_diagram" foreignTable="BPMN_DIAGRAM"> <foreign-key name="fk_bpmn_flow_diagram" foreignTable="BPMN_DIAGRAM">
<reference local="DIA_UID" foreign="DIA_UID"/> <reference local="DIA_UID" foreign="DIA_UID"/>
</foreign-key> </foreign-key>
<index> <index name="BPMN_FLOW_I_1">
<index-column name="FLO_UID"/> <index-column name="FLO_UID"/>
</index> </index>
<index> <index name="BPMN_FLOW_I_2">
<index-column name="PRJ_UID"/> <index-column name="PRJ_UID"/>
</index> </index>
<index> <index name="BPMN_FLOW_I_3">
<index-column name="DIA_UID"/> <index-column name="DIA_UID"/>
</index> </index>
</table> </table>
@@ -3622,13 +3622,13 @@
<foreign-key name="fk_bpmn_gateway_process" foreignTable="BPMN_PROCESS"> <foreign-key name="fk_bpmn_gateway_process" foreignTable="BPMN_PROCESS">
<reference local="PRO_UID" foreign="PRO_UID"/> <reference local="PRO_UID" foreign="PRO_UID"/>
</foreign-key> </foreign-key>
<index> <index name="BPMN_GATEWAY_I_1">
<index-column name="GAT_UID"/> <index-column name="GAT_UID"/>
</index> </index>
<index> <index name="BPMN_GATEWAY_I_2">
<index-column name="PRJ_UID"/> <index-column name="PRJ_UID"/>
</index> </index>
<index> <index name="BPMN_GATEWAY_I_3">
<index-column name="PRO_UID"/> <index-column name="PRO_UID"/>
</index> </index>
</table> </table>
@@ -3659,13 +3659,13 @@
<foreign-key name="fk_bpmn_laneset_process" foreignTable="BPMN_PROCESS"> <foreign-key name="fk_bpmn_laneset_process" foreignTable="BPMN_PROCESS">
<reference local="PRO_UID" foreign="PRO_UID"/> <reference local="PRO_UID" foreign="PRO_UID"/>
</foreign-key> </foreign-key>
<index> <index name="BPMN_LANESET_I_1">
<index-column name="LNS_UID"/> <index-column name="LNS_UID"/>
</index> </index>
<index> <index name="BPMN_LANESET_I_2">
<index-column name="PRJ_UID"/> <index-column name="PRJ_UID"/>
</index> </index>
<index> <index name="BPMN_LANESET_I_3">
<index-column name="PRO_UID"/> <index-column name="PRO_UID"/>
</index> </index>
</table> </table>
@@ -3695,13 +3695,13 @@
<foreign-key name="fk_bpmn_lane_laneset" foreignTable="BPMN_LANESET"> <foreign-key name="fk_bpmn_lane_laneset" foreignTable="BPMN_LANESET">
<reference local="LNS_UID" foreign="LNS_UID"/> <reference local="LNS_UID" foreign="LNS_UID"/>
</foreign-key> </foreign-key>
<index> <index name="BPMN_LANE_I_1">
<index-column name="LAN_UID"/> <index-column name="LAN_UID"/>
</index> </index>
<index> <index name="BPMN_LANE_I_2">
<index-column name="PRJ_UID"/> <index-column name="PRJ_UID"/>
</index> </index>
<index> <index name="BPMN_LANE_I_3">
<index-column name="LNS_UID"/> <index-column name="LNS_UID"/>
</index> </index>
</table> </table>
@@ -3731,10 +3731,10 @@
<foreign-key name="fk_bpmn_participant_project" foreignTable="BPMN_PROJECT"> <foreign-key name="fk_bpmn_participant_project" foreignTable="BPMN_PROJECT">
<reference local="PRJ_UID" foreign="PRJ_UID"/> <reference local="PRJ_UID" foreign="PRJ_UID"/>
</foreign-key> </foreign-key>
<index> <index name="BPMN_PARTICIPANT_I_1">
<index-column name="PAR_UID"/> <index-column name="PAR_UID"/>
</index> </index>
<index> <index name="BPMN_PARTICIPANT_I_2">
<index-column name="PRJ_UID"/> <index-column name="PRJ_UID"/>
</index> </index>
</table> </table>
@@ -3760,10 +3760,10 @@
<foreign-key name="fk_bpmn_extension_project" foreignTable="BPMN_PROJECT"> <foreign-key name="fk_bpmn_extension_project" foreignTable="BPMN_PROJECT">
<reference local="PRJ_UID" foreign="PRJ_UID"/> <reference local="PRJ_UID" foreign="PRJ_UID"/>
</foreign-key> </foreign-key>
<index> <index name="BPMN_EXTENSION_I_1">
<index-column name="EXT_UID"/> <index-column name="EXT_UID"/>
</index> </index>
<index> <index name="BPMN_EXTENSION_I_2">
<index-column name="PRJ_UID"/> <index-column name="PRJ_UID"/>
</index> </index>
</table> </table>
@@ -3789,10 +3789,10 @@
<foreign-key name="fk_bpmn_documentation_project" foreignTable="BPMN_PROJECT"> <foreign-key name="fk_bpmn_documentation_project" foreignTable="BPMN_PROJECT">
<reference local="PRJ_UID" foreign="PRJ_UID"/> <reference local="PRJ_UID" foreign="PRJ_UID"/>
</foreign-key> </foreign-key>
<index> <index name="BPMN_DOCUMENTATION_I_1">
<index-column name="DOC_UID"/> <index-column name="DOC_UID"/>
</index> </index>
<index> <index name="BPMN_DOCUMENTATION_I_2">
<index-column name="PRJ_UID"/> <index-column name="PRJ_UID"/>
</index> </index>
</table> </table>
@@ -3818,7 +3818,7 @@
</table> </table>
<table name="ADDONS_STORE"> <table name="ADDONS_STORE">
<column name="STORE_ID" type="VARCHAR" size="32" primaryKey="true" /> <column name="STORE_ID" type="VARCHAR" size="32" primaryKey="true" required="true"/>
<column name="STORE_VERSION" type="INTEGER" /> <column name="STORE_VERSION" type="INTEGER" />
<column name="STORE_LOCATION" type="VARCHAR" size="2048" required="true" /> <column name="STORE_LOCATION" type="VARCHAR" size="2048" required="true" />
<column name="STORE_TYPE" type="VARCHAR" size="255" required="true" /> <column name="STORE_TYPE" type="VARCHAR" size="255" required="true" />
@@ -3847,7 +3847,7 @@
</table> </table>
<table name="LICENSE_MANAGER"> <table name="LICENSE_MANAGER">
<column name="LICENSE_UID" type="VARCHAR" size="32" primaryKey="true" /> <column name="LICENSE_UID" type="VARCHAR" size="32" primaryKey="true" required="true"/>
<column name="LICENSE_USER" type="VARCHAR" size="150" required="true" default="0"/> <column name="LICENSE_USER" type="VARCHAR" size="150" required="true" default="0"/>
<column name="LICENSE_START" type="INTEGER" required="true" default="0"/> <column name="LICENSE_START" type="INTEGER" required="true" default="0"/>
<column name="LICENSE_END" type="INTEGER" required="true" default="0"/> <column name="LICENSE_END" type="INTEGER" required="true" default="0"/>

View File

@@ -379,7 +379,7 @@ class Main extends Controller
$newPass = G::generate_password(); $newPass = G::generate_password();
$aData['USR_UID'] = $userData['USR_UID']; $aData['USR_UID'] = $userData['USR_UID'];
$aData['USR_PASSWORD'] = Bootstrap::hasPassword( $newPass ); $aData['USR_PASSWORD'] = Bootstrap::hashPassword( $newPass );
$rbacUser->update( $aData ); $rbacUser->update( $aData );
$user->update( $aData ); $user->update( $aData );

View File

@@ -185,7 +185,7 @@ class webEntryProxy extends HttpProxyController
$template->assign( 'dynaformUid', $sDYNAFORM ); $template->assign( 'dynaformUid', $sDYNAFORM );
$template->assign( 'taskUid', $sTASKS ); $template->assign( 'taskUid', $sTASKS );
$template->assign( 'wsUser', $sWS_USER ); $template->assign( 'wsUser', $sWS_USER );
$template->assign( 'wsPass', 'md5:' . md5( $sWS_PASS ) ); $template->assign( 'wsPass', Bootstrap::hashPassword($sWS_PASS, '', true) );
$template->assign( 'wsRoundRobin', $sWS_ROUNDROBIN ); $template->assign( 'wsRoundRobin', $sWS_ROUNDROBIN );
if ($sWE_USR == "2") { if ($sWE_USR == "2") {

View File

@@ -346,25 +346,6 @@ class enterprisePlugin extends PMPlugin
fclose($file); fclose($file);
} }
} }
public function hashPassword ($pass, $previous=false)
{
G::LoadClass( "configuration" );
$config= new Configurations();
$typeEncrypt = $config->getConfiguration('ENTERPRISE_SETTING_ENCRYPT', '');
$encrypt = 'md5';
if ($typeEncrypt != null) {
if (isset($typeEncrypt['current']) && $typeEncrypt['current'] != '') {
$encrypt = $typeEncrypt['current'];
}
if ($previous && isset($typeEncrypt['previous']) && $typeEncrypt['previous'] != '' ) {
$encrypt = $typeEncrypt['previous'];
}
}
eval("\$var = hash('" . $encrypt . "', '" . $pass . "');");
return $var;
}
} }
$oPluginRegistry = &PMPluginRegistry::getSingleton(); $oPluginRegistry = &PMPluginRegistry::getSingleton();

View File

@@ -131,7 +131,7 @@ try {
} }
//Log failed authentications //Log failed authentications
$message = "| Many failed authentication attempts for USER: " . $usr . " | IP: " . G::getIpAddress() . " | WS: " . SYS_SYS; $message = "| Many failed authentication attempts for USER: " . $usr . " | IP: " . G::getIpAddress() . " | WS: " . SYS_SYS;
$message .= " | BROWSER: " . $_SERVER['HTTP_USER_AGENT'] ." | \n" ; $message .= " | BROWSER: " . $_SERVER['HTTP_USER_AGENT'];
G::log($message, PATH_DATA, 'loginFailed.log'); G::log($message, PATH_DATA, 'loginFailed.log');
} }

View File

@@ -5,7 +5,7 @@ $aUser = $oUser->load($_SESSION['USER_LOGGED']);
global $RBAC; global $RBAC;
$aData['USR_UID'] = $aUser['USR_UID']; $aData['USR_UID'] = $aUser['USR_UID'];
$aData['USR_USERNAME'] = $aUser['USR_USERNAME']; $aData['USR_USERNAME'] = $aUser['USR_USERNAME'];
$aData['USR_PASSWORD'] = Bootstrap::hasPassword($_POST['form']['USR_PASSWORD']); $aData['USR_PASSWORD'] = Bootstrap::hashPassword($_POST['form']['USR_PASSWORD']);
$aData['USR_FIRSTNAME'] = $aUser['USR_FIRSTNAME']; $aData['USR_FIRSTNAME'] = $aUser['USR_FIRSTNAME'];
$aData['USR_LASTNAME'] = $aUser['USR_LASTNAME']; $aData['USR_LASTNAME'] = $aUser['USR_LASTNAME'];
$aData['USR_EMAIL'] = $aUser['USR_EMAIL']; $aData['USR_EMAIL'] = $aUser['USR_EMAIL'];

View File

@@ -22,7 +22,7 @@ if ($userData['USR_EMAIL'] != '' && $userData['USR_EMAIL'] === $data['USR_EMAIL'
$newPass = G::generate_password(); $newPass = G::generate_password();
$aData['USR_UID'] = $userData['USR_UID']; $aData['USR_UID'] = $userData['USR_UID'];
$aData['USR_PASSWORD'] = Bootstrap::hasPassword($newPass); $aData['USR_PASSWORD'] = Bootstrap::hashPassword($newPass);
/* **Save after sending the mail /* **Save after sending the mail
$rbacUser->update($aData); $rbacUser->update($aData);
$user->update($aData); $user->update($aData);

View File

@@ -64,7 +64,7 @@ if (isset( $_POST['category'] ) && $_POST['category'] !== '<reset>') {
$memkeyTotal = $memkey . '-total'; $memkeyTotal = $memkey . '-total';
$memcacheUsed = 'yes'; $memcacheUsed = 'yes';
if (($proData = $memcache->get( $memkey )) === false || ($totalCount = $memcache->get( $memkeyTotal )) === false) { if (($proData = $memcache->get( $memkey )) === false || ($totalCount = $memcache->get( $memkeyTotal )) === false) {
$proData = $oProcess->getAllProcesses( $start, $limit); $proData = $oProcess->getAllProcesses( $start, $limit, null, null, true, false, $_SESSION["USER_LOGGED"]);
$totalCount = count($proData); $totalCount = count($proData);
$proData = array_splice($proData, $start, $limit); $proData = array_splice($proData, $start, $limit);
$memcache->set( $memkey, $proData, PMmemcached::ONE_HOUR ); $memcache->set( $memkey, $proData, PMmemcached::ONE_HOUR );

View File

@@ -71,7 +71,7 @@ try {
$template->assign( 'dynaformUid', $sDYNAFORM ); $template->assign( 'dynaformUid', $sDYNAFORM );
$template->assign( 'taskUid', $sTASKS ); $template->assign( 'taskUid', $sTASKS );
$template->assign( 'wsUser', $sWS_USER ); $template->assign( 'wsUser', $sWS_USER );
$template->assign( 'wsPass', 'md5:' . md5( $sWS_PASS ) ); $template->assign( 'wsPass', Bootstrap::hashPassword($sWS_PASS, '', true) );
$template->assign( 'wsRoundRobin', $sWS_ROUNDROBIN ); $template->assign( 'wsRoundRobin', $sWS_ROUNDROBIN );
if ($sWE_USR == "2") { if ($sWE_USR == "2") {

View File

@@ -50,7 +50,7 @@ try {
$_POST['form']['USR_NEW_PASS'] = ''; $_POST['form']['USR_NEW_PASS'] = '';
} }
if ($_POST['form']['USR_NEW_PASS'] != '') { if ($_POST['form']['USR_NEW_PASS'] != '') {
$_POST['form']['USR_PASSWORD'] = Bootstrap::hasPassword( $_POST['form']['USR_NEW_PASS'] ); $_POST['form']['USR_PASSWORD'] = Bootstrap::hashPassword( $_POST['form']['USR_NEW_PASS'] );
} }
if (! isset( $_POST['form']['USR_CITY'] )) { if (! isset( $_POST['form']['USR_CITY'] )) {
$_POST['form']['USR_CITY'] = ''; $_POST['form']['USR_CITY'] = '';

View File

@@ -130,7 +130,7 @@ switch ($_POST['action']) {
$form['USR_NEW_PASS'] = ''; $form['USR_NEW_PASS'] = '';
} }
if ($form['USR_NEW_PASS'] != '') { if ($form['USR_NEW_PASS'] != '') {
$form['USR_PASSWORD'] = Bootstrap::hasPassword($form['USR_NEW_PASS']); $form['USR_PASSWORD'] = Bootstrap::hashPassword($form['USR_NEW_PASS']);
} }
if (!isset($form['USR_CITY'])) { if (!isset($form['USR_CITY'])) {
$form['USR_CITY'] = ''; $form['USR_CITY'] = '';
@@ -214,7 +214,7 @@ switch ($_POST['action']) {
*/ */
require_once 'classes/model/UsersProperties.php'; require_once 'classes/model/UsersProperties.php';
$oUserProperty = new UsersProperties(); $oUserProperty = new UsersProperties();
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($aData['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array(Bootstrap::hasPassword($aData['USR_PASSWORD']))))); $aUserProperty = $oUserProperty->loadOrCreateIfNotExists($aData['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array(Bootstrap::hashPassword($aData['USR_PASSWORD'])))));
$aUserProperty['USR_LOGGED_NEXT_TIME'] = $form['USR_LOGGED_NEXT_TIME']; $aUserProperty['USR_LOGGED_NEXT_TIME'] = $form['USR_LOGGED_NEXT_TIME'];
$oUserProperty->update($aUserProperty); $oUserProperty->update($aUserProperty);
} else { } else {
@@ -228,7 +228,7 @@ switch ($_POST['action']) {
$aData['USR_PASSWORD'] = $form['USR_PASSWORD']; $aData['USR_PASSWORD'] = $form['USR_PASSWORD'];
require_once 'classes/model/UsersProperties.php'; require_once 'classes/model/UsersProperties.php';
$oUserProperty = new UsersProperties(); $oUserProperty = new UsersProperties();
$aUserProperty = $oUserProperty->loadOrCreateIfNotExists($form['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array(md5($form['USR_PASSWORD']))))); $aUserProperty = $oUserProperty->loadOrCreateIfNotExists($form['USR_UID'], array('USR_PASSWORD_HISTORY' => serialize(array(Bootstrap::hashPassword($form['USR_PASSWORD'])))));
$memKey = 'rbacSession' . session_id(); $memKey = 'rbacSession' . session_id();
$memcache = & PMmemcached::getSingleton(defined('SYS_SYS') ? SYS_SYS : '' ); $memcache = & PMmemcached::getSingleton(defined('SYS_SYS') ? SYS_SYS : '' );

View File

@@ -63,7 +63,7 @@ try {
$form['USR_NEW_PASS'] = ''; $form['USR_NEW_PASS'] = '';
} }
if ($form['USR_NEW_PASS'] != '') { if ($form['USR_NEW_PASS'] != '') {
$form['USR_PASSWORD'] = Bootstrap::hasPassword( $form['USR_NEW_PASS'] ); $form['USR_PASSWORD'] = Bootstrap::hashPassword( $form['USR_NEW_PASS'] );
} }
if (! isset( $form['USR_CITY'] )) { if (! isset( $form['USR_CITY'] )) {
$form['USR_CITY'] = ''; $form['USR_CITY'] = '';

View File

@@ -650,20 +650,6 @@ class Calendar
); );
} }
//Number records total
$criteriaCount = clone $criteria;
$criteriaCount->clearSelectColumns();
$criteriaCount->addSelectColumn("COUNT(" . \CalendarDefinitionPeer::CALENDAR_UID . ") AS NUM_REC");
$rsCriteriaCount = \CalendarDefinitionPeer::doSelectRS($criteriaCount);
$rsCriteriaCount->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$rsCriteriaCount->next();
$row = $rsCriteriaCount->getRow();
$numRecTotal = $row["NUM_REC"];
//SQL //SQL
if (!is_null($sortField) && trim($sortField) != "") { if (!is_null($sortField) && trim($sortField) != "") {
$sortField = strtoupper($sortField); $sortField = strtoupper($sortField);

View File

@@ -480,20 +480,6 @@ class Group
$criteria->add(\ContentPeer::CON_VALUE, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE); $criteria->add(\ContentPeer::CON_VALUE, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE);
} }
//Number records total
$criteriaCount = clone $criteria;
$criteriaCount->clearSelectColumns();
$criteriaCount->addAsColumn("NUM_REC", "COUNT(" . \GroupwfPeer::GRP_UID . ")");
$rsCriteriaCount = \GroupwfPeer::doSelectRS($criteriaCount);
$rsCriteriaCount->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$rsCriteriaCount->next();
$row = $rsCriteriaCount->getRow();
$numRecTotal = (int)($row["NUM_REC"]);
//SQL //SQL
if (!is_null($sortField) && trim($sortField) != "") { if (!is_null($sortField) && trim($sortField) != "") {
$sortField = strtoupper($sortField); $sortField = strtoupper($sortField);
@@ -704,20 +690,6 @@ class Group
break; break;
} }
//Number records total
$criteriaCount = clone $criteria;
$criteriaCount->clearSelectColumns();
$criteriaCount->addAsColumn("NUM_REC", "COUNT(" . \UsersPeer::USR_UID . ")");
$rsCriteriaCount = \UsersPeer::doSelectRS($criteriaCount);
$rsCriteriaCount->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$rsCriteriaCount->next();
$row = $rsCriteriaCount->getRow();
$numRecTotal = (int)($row["NUM_REC"]);
//SQL //SQL
if (!is_null($sortField) && trim($sortField) != "") { if (!is_null($sortField) && trim($sortField) != "") {
$sortField = strtoupper($sortField); $sortField = strtoupper($sortField);

View File

@@ -396,20 +396,6 @@ class ProcessCategory
$criteria->add(\ProcessCategoryPeer::CATEGORY_NAME, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE); $criteria->add(\ProcessCategoryPeer::CATEGORY_NAME, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE);
} }
//Number records total
$criteriaCount = clone $criteria;
$criteriaCount->clearSelectColumns();
$criteriaCount->addAsColumn("NUM_REC", "COUNT(" . \ProcessCategoryPeer::CATEGORY_UID . ")");
$rsCriteriaCount = \ProcessCategoryPeer::doSelectRS($criteriaCount);
$rsCriteriaCount->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$rsCriteriaCount->next();
$row = $rsCriteriaCount->getRow();
$numRecTotal = (int)($row["NUM_REC"]);
//SQL //SQL
if (!is_null($sortField) && trim($sortField) != "") { if (!is_null($sortField) && trim($sortField) != "") {
$sortField = strtoupper($sortField); $sortField = strtoupper($sortField);

View File

@@ -336,7 +336,7 @@ class ProjectUser
$params = array( $params = array(
"userid" => $username, "userid" => $username,
"password" => "md5:" . md5($password) "password" => Bootstrap::hashPassword($password, '', true)
); );
$response = $client->login($params); $response = $client->login($params);

View File

@@ -518,20 +518,6 @@ class Role
$criteria->add(\RolesPeer::ROL_CODE, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE); $criteria->add(\RolesPeer::ROL_CODE, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE);
} }
//Number records total
$criteriaCount = clone $criteria;
$criteriaCount->clearSelectColumns();
$criteriaCount->addAsColumn("NUM_REC", "COUNT(" . \RolesPeer::ROL_UID . ")");
$rsCriteriaCount = \RolesPeer::doSelectRS($criteriaCount);
$rsCriteriaCount->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$rsCriteriaCount->next();
$row = $rsCriteriaCount->getRow();
$numRecTotal = (int)($row["NUM_REC"]);
//SQL //SQL
if (!is_null($sortField) && trim($sortField) != "") { if (!is_null($sortField) && trim($sortField) != "") {
$sortField = strtoupper($sortField); $sortField = strtoupper($sortField);

View File

@@ -341,20 +341,6 @@ class Permission
$criteria->add(\PermissionsPeer::PER_CODE, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE); $criteria->add(\PermissionsPeer::PER_CODE, "%" . $arrayFilterData["filter"] . "%", \Criteria::LIKE);
} }
//Number records total
$criteriaCount = clone $criteria;
$criteriaCount->clearSelectColumns();
$criteriaCount->addAsColumn("NUM_REC", "COUNT(" . \PermissionsPeer::PER_UID . ")");
$rsCriteriaCount = \PermissionsPeer::doSelectRS($criteriaCount);
$rsCriteriaCount->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$rsCriteriaCount->next();
$row = $rsCriteriaCount->getRow();
$numRecTotal = $row["NUM_REC"];
//SQL //SQL
if (!is_null($sortField) && trim($sortField) != "") { if (!is_null($sortField) && trim($sortField) != "") {
$sortField = strtoupper($sortField); $sortField = strtoupper($sortField);

View File

@@ -353,20 +353,6 @@ class User
); );
} }
//Number records total
$criteriaCount = clone $criteria;
$criteriaCount->clearSelectColumns();
$criteriaCount->addAsColumn("NUM_REC", "COUNT(" . \RbacUsersPeer::USR_UID . ")");
$rsCriteriaCount = \RbacUsersPeer::doSelectRS($criteriaCount);
$rsCriteriaCount->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$rsCriteriaCount->next();
$row = $rsCriteriaCount->getRow();
$numRecTotal = $row["NUM_REC"];
//SQL //SQL
if (!is_null($sortField) && trim($sortField) != "") { if (!is_null($sortField) && trim($sortField) != "") {
$sortField = strtoupper($sortField); $sortField = strtoupper($sortField);

View File

@@ -396,7 +396,7 @@ class WebEntry
$template->assign("dynaformUid", $dynaFormUid); $template->assign("dynaformUid", $dynaFormUid);
$template->assign("taskUid", $taskUid); $template->assign("taskUid", $taskUid);
$template->assign("wsUser", $usrUsername); $template->assign("wsUser", $usrUsername);
$template->assign("wsPass", "md5:" . $usrPassword); $template->assign("wsPass", Bootstrap::getPasswordHashType() . ':' . $usrPassword);
$template->assign("wsRoundRobin", $wsRoundRobin); $template->assign("wsRoundRobin", $wsRoundRobin);
if ($webEntryInputDocumentAccess == 0) { if ($webEntryInputDocumentAccess == 0) {