solve conflicts

This commit is contained in:
Henry Jordan
2021-06-24 15:59:57 +00:00
15 changed files with 224 additions and 19 deletions

View File

@@ -109,6 +109,7 @@ export default {
credentials = window.config.SYS_CREDENTIALS,
workspace = window.config.SYS_WORKSPACE,
server = window.config.SYS_SERVER_API,
lang = window.config.SYS_LANG,
method = options.method || "get";
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
@@ -119,7 +120,8 @@ export default {
headers: {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": `Bearer ` + credentials.accessToken
"Authorization": `Bearer ` + credentials.accessToken,
"Accept-Language": lang
}
});
},
@@ -130,6 +132,7 @@ export default {
url,
credentials = window.config.SYS_CREDENTIALS,
workspace = window.config.SYS_WORKSPACE,
lang = window.config.SYS_LANG,
server = window.config.SYS_SERVER_API;
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
@@ -140,7 +143,8 @@ export default {
headers: {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": `Bearer ` + credentials.accessToken
"Authorization": `Bearer ` + credentials.accessToken,
"Accept-Language": lang
}
});
},
@@ -153,6 +157,7 @@ export default {
url,
credentials = window.config.SYS_CREDENTIALS,
workspace = window.config.SYS_WORKSPACE,
lang = window.config.SYS_LANG,
server = window.config.SYS_SERVER_API;
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
@@ -164,7 +169,8 @@ export default {
headers: _.extend({
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": `Bearer ` + credentials.accessToken
"Authorization": `Bearer ` + credentials.accessToken,
"Accept-Language": lang
}, headers)
});
},
@@ -200,6 +206,7 @@ export default {
url,
credentials = window.config.SYS_CREDENTIALS,
workspace = window.config.SYS_WORKSPACE,
lang = window.config.SYS_LANG,
server = window.config.SYS_SERVER_API;
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
@@ -209,7 +216,8 @@ export default {
headers: {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": `Bearer ` + credentials.accessToken
"Authorization": `Bearer ` + credentials.accessToken,
"Accept-Language": lang
}
});
},
@@ -222,6 +230,7 @@ export default {
url,
credentials = window.config.SYS_CREDENTIALS,
workspace = window.config.SYS_WORKSPACE,
lang = window.config.SYS_LANG,
server = window.config.SYS_SERVER_API;
url = this.getUrl(_.extend(keys, credentials, { server }, { workspace }), service);
@@ -261,7 +270,8 @@ export default {
headers: {
"Accept": "application/json",
"Content-Type": "application/json",
"Authorization": `Bearer ` + credentials.accessToken
"Authorization": `Bearer ` + credentials.accessToken,
"Accept-Language": lang
}
});
}

View File

@@ -107,7 +107,8 @@ export let cases = {
window.config.SYS_WORKSPACE +
'/home/' + data.APP_NUMBER + '/pending-tasks', {
headers: {
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken,
"Accept-Language": window.config.SYS_LANG
}
});
},
@@ -256,7 +257,8 @@ export let casesHeader = {
window.config.SYS_WORKSPACE +
'/home/counters', {
headers: {
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken,
"Accept-Language": window.config.SYS_LANG
}
});
}

View File

@@ -8,7 +8,8 @@ export let menu = {
window.config.SYS_WORKSPACE +
'/home/menu', {
headers: {
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken,
"Accept-Language": window.config.SYS_LANG
}
});
@@ -20,7 +21,8 @@ export let menu = {
window.config.SYS_WORKSPACE +
'/home/tasks/counter', {
headers: {
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken
'Authorization': 'Bearer ' + window.config.SYS_CREDENTIALS.accessToken,
"Accept-Language": window.config.SYS_LANG
}
});
}

View File

@@ -115,7 +115,7 @@ export default {
filterHeader: "STARTED_BY_ME",
headers: [],
newCase: {
title: "New Case",
title: this.$i18n.t("ID_NEW_CASE"),
class: "btn-success",
onClick: () => {
this.$refs["newRequest"].show();
@@ -149,6 +149,15 @@ export default {
duration: this.$i18n.t("ID_DURATION"),
actions: "",
},
texts: {
count:this.$i18n.t("ID_SHOWING_FROM_RECORDS_COUNT"),
first: this.$i18n.t("ID_FIRST"),
last: this.$i18n.t("ID_LAST"),
filter: this.$i18n.t("ID_FILTER") + ":",
limit: this.$i18n.t("ID_RECORDS") + ":",
page: this.$i18n.t("ID_PAGE") + ":",
noResults: this.$i18n.t("ID_NO_MATCHING_RECORDS")
},
selectable: {
mode: "single",
only: function(row) {

View File

@@ -169,6 +169,15 @@ export default {
due_date: this.$i18n.t("ID_DUE_DATE"),
actions: this.$i18n.t("ID_ACTIONS")
},
texts: {
count:this.$i18n.t("ID_SHOWING_FROM_RECORDS_COUNT"),
first: this.$i18n.t("ID_FIRST"),
last: this.$i18n.t("ID_LAST"),
filter: this.$i18n.t("ID_FILTER") + ":",
limit: this.$i18n.t("ID_RECORDS") + ":",
page: this.$i18n.t("ID_PAGE") + ":",
noResults: this.$i18n.t("ID_NO_MATCHING_RECORDS")
},
selectable: {
mode: "single", // or 'multiple'
only: function (row) {

View File

@@ -64,7 +64,7 @@ export default {
data() {
return {
newCase: {
title: "New Case",
title: this.$i18n.t("ID_NEW_CASE"),
class: "btn-success",
onClick: () => {
this.$refs["newRequest"].show();
@@ -83,6 +83,7 @@ export default {
options: {
filterable: false,
headings: {
detail: "",
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
case_title: this.$i18n.t("ID_CASE_TITLE"),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
@@ -100,6 +101,15 @@ export default {
requestFunction(data) {
return this.$parent.$parent.getCasesForVueTable(data);
},
texts: {
count:this.$i18n.t("ID_SHOWING_FROM_RECORDS_COUNT"),
first: this.$i18n.t("ID_FIRST"),
last: this.$i18n.t("ID_LAST"),
filter: this.$i18n.t("ID_FILTER") + ":",
limit: this.$i18n.t("ID_RECORDS") + ":",
page: this.$i18n.t("ID_PAGE") + ":",
noResults: this.$i18n.t("ID_NO_MATCHING_RECORDS")
}
},
pmDateFormat: "Y-m-d H:i:s",
clickCount: 0,

View File

@@ -99,7 +99,7 @@ export default {
filterHeader: "STARTED",
headers: [],
newCase: {
title: "New Case",
title: this.$i18n.t("ID_NEW_CASE"),
class: "btn-success",
onClick: () => {
this.$refs["newRequest"].show();
@@ -130,6 +130,15 @@ export default {
duration: this.$i18n.t("ID_DURATION"),
actions: "",
},
texts: {
count:this.$i18n.t("ID_SHOWING_FROM_RECORDS_COUNT"),
first: this.$i18n.t("ID_FIRST"),
last: this.$i18n.t("ID_LAST"),
filter: this.$i18n.t("ID_FILTER") + ":",
limit: this.$i18n.t("ID_RECORDS") + ":",
page: this.$i18n.t("ID_PAGE") + ":",
noResults: this.$i18n.t("ID_NO_MATCHING_RECORDS")
},
selectable: {
mode: "single",
only: function(row) {

View File

@@ -80,7 +80,7 @@ export default {
data() {
return {
newCase: {
title: "New Case",
title: this.$i18n.t("ID_NEW_CASE"),
class: "btn-success",
onClick: () => {
this.$refs["newRequest"].show();
@@ -112,6 +112,15 @@ export default {
actions: "",
detail: "",
},
texts: {
count:this.$i18n.t("ID_SHOWING_FROM_RECORDS_COUNT"),
first: this.$i18n.t("ID_FIRST"),
last: this.$i18n.t("ID_LAST"),
filter: this.$i18n.t("ID_FILTER") + ":",
limit: this.$i18n.t("ID_RECORDS") + ":",
page: this.$i18n.t("ID_PAGE") + ":",
noResults: this.$i18n.t("ID_NO_MATCHING_RECORDS")
},
selectable: {
mode: "single",
only: function (row) {

View File

@@ -74,7 +74,7 @@ export default {
data() {
return {
newCase: {
title: "New Case",
title: this.$i18n.t("ID_NEW_CASE"),
class: "btn-success",
onClick: () => {
this.$refs["newRequest"].show();
@@ -95,6 +95,7 @@ export default {
options: {
filterable: false,
headings: {
detail: "",
case_number: this.$i18n.t("ID_MYCASE_NUMBER"),
case_title: this.$i18n.t("ID_CASE_TITLE"),
process_name: this.$i18n.t("ID_PROCESS_NAME"),
@@ -105,6 +106,15 @@ export default {
priority: this.$i18n.t("ID_PRIORITY"),
actions: "",
},
texts: {
count:this.$i18n.t("ID_SHOWING_FROM_RECORDS_COUNT"),
first: this.$i18n.t("ID_FIRST"),
last: this.$i18n.t("ID_LAST"),
filter: this.$i18n.t("ID_FILTER") + ":",
limit: this.$i18n.t("ID_RECORDS") + ":",
page: this.$i18n.t("ID_PAGE") + ":",
noResults: this.$i18n.t("ID_NO_MATCHING_RECORDS")
},
selectable: {
mode: "single",
only: function (row) {

View File

@@ -74,7 +74,7 @@ export default {
data() {
return {
newCase: {
title: "New Case",
title: this.$i18n.t("ID_NEW_CASE"),
class: "btn-success",
onClick: () => {
this.$refs["newRequest"].show();
@@ -107,6 +107,15 @@ export default {
actions: "",
detail: "",
},
texts: {
count:this.$i18n.t("ID_SHOWING_FROM_RECORDS_COUNT"),
first: this.$i18n.t("ID_FIRST"),
last: this.$i18n.t("ID_LAST"),
filter: this.$i18n.t("ID_FILTER") + ":",
limit: this.$i18n.t("ID_RECORDS") + ":",
page: this.$i18n.t("ID_PAGE") + ":",
noResults: this.$i18n.t("ID_NO_MATCHING_RECORDS")
},
selectable: {
mode: "single",
only: function (row) {

View File

@@ -0,0 +1,120 @@
<?php
namespace Tests\unit\workflow\engine\src\ProcessMaker\Validation;
use Exception;
use ProcessMaker\Validation\SqlBlacklist;
use Tests\TestCase;
class SqlBlacklistTest extends TestCase
{
/**
* Property $sqlBlacklist
* @var object
*/
private $sqlBlacklist;
/**
* Property $content.
* @var string
*/
private $content;
/**
* Method setUp.
*/
public function setUp()
{
parent::setUp();
$this->content = "";
$path = PATH_CONFIG . 'execute-query-blacklist.ini';
if (file_exists($path)) {
$this->content = file_get_contents($path);
}
}
/**
* Method tearDown.
*/
public function tearDown()
{
parent::tearDown();
$path = PATH_CONFIG . 'execute-query-blacklist.ini';
if (file_exists($path)) {
file_put_contents($path, $this->content);
}
}
/**
* This test the getConfigValues method.
* @test
* @covers \ProcessMaker\Validation\SqlBlacklist::getConfigValues()
*/
public function it_should_test_getConfigValues_method()
{
$this->sqlBlacklist = new SqlBlacklist();
$result = $this->sqlBlacklist->getConfigValues();
//asserts
$this->assertArrayHasKey('tables', $result);
$this->assertArrayHasKey('statements', $result);
$this->assertArrayHasKey('pmtables', $result);
}
/**
* This test the validate method when restricted system tables.
* @test
* @covers \ProcessMaker\Validation\SqlBlacklist::validate()
*/
public function it_should_test_validate_method_when_restricted_system_tables()
{
//assert exception
$this->expectException(Exception::class);
$sql = "INSERT INTO APPLICATION (c1,c2,c3) values('', '', '')";
$this->sqlBlacklist = new SqlBlacklist($sql);
$this->sqlBlacklist->validate();
}
/**
* This test the validate method when restricted queries.
* @test
* @covers \ProcessMaker\Validation\SqlBlacklist::validate()
*/
public function it_should_test_validate_method_when_restricted_queries()
{
//assert exception
$this->expectException(Exception::class);
$path = PATH_CONFIG . 'execute-query-blacklist.ini';
$content = ""
. "queries = \"INSERT|UPDATE|REPLACE|DELETE|SHOW\"\n\n"
. "pmtables = \"PMT_TEST\"\n";
file_put_contents($path, $content);
$sql = "SHOW tables";
$this->sqlBlacklist = new SqlBlacklist($sql);
$this->sqlBlacklist->validate();
}
/**
* This test the validate method when restricted pmtables.
* @test
* @covers \ProcessMaker\Validation\SqlBlacklist::validate()
*/
public function it_should_test_validate_method_when_restricted_pmtables()
{
//assert exception
$this->expectException(Exception::class);
$path = PATH_CONFIG . 'execute-query-blacklist.ini';
$content = ""
. "queries = \"INSERT|UPDATE|REPLACE|DELETE|SHOW\"\n\n"
. "pmtables = \"PMT_TEST\"\n";
file_put_contents($path, $content);
$sql = "INSERT INTO PMT_TEST (c1,c2,c3) values('', '', '')";
$this->sqlBlacklist = new SqlBlacklist($sql);
$this->sqlBlacklist->validate();
}
}

View File

@@ -24077,6 +24077,12 @@ msgstr "Saving"
msgid "Saving process"
msgstr "Saving process"
# TRANSLATION
# LABEL/ID_SCHEDULE_TIME
#: LABEL/ID_SCHEDULE_TIME
msgid "New cases scheduler"
msgstr "New cases scheduler"
# TRANSLATION
# LABEL/ID_SCHEDULER_LIST
#: LABEL/ID_SCHEDULER_LIST

View File

@@ -730,9 +730,9 @@ class InstallerModule extends Controller
$dbText .= sprintf(" define ('DB_REPORT_PASS', '%s' );\n", $wfPass);
$requestFlag = $_REQUEST['PARTNER_FLAG'];
if (defined('PARTNER_FLAG') || isset($requestFlag])) {
if (defined('PARTNER_FLAG') || isset($requestFlag)) {
$dbText .= "\n";
$dbText .= " (define('PARTNER_FLAG', " . (defined('PARTNER_FLAG') ? PARTNER_FLAG : isset(requestFlag)) ? $requestFlag : 'false') . ");\n";
$dbText .= " define ('PARTNER_FLAG', " . (defined('PARTNER_FLAG') ? PARTNER_FLAG : (isset($requestFlag) ? $requestFlag : 'false') ) . ");\n";
if (!empty($this->systemName)) {
$dbText .= " define ('SYSTEM_NAME', '" . $this->systemName . "');\n";
}

View File

@@ -60925,6 +60925,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
( 'LABEL','ID_SAVING_ENVIRONMENT_SETTINGS','en','Saving Environment Settings','2014-01-15') ,
( 'LABEL','ID_SAVING_LABEL','en','Saving','2014-01-15') ,
( 'LABEL','ID_SAVING_PROCESS','en','Saving process','2014-01-15') ,
( 'LABEL','ID_SCHEDULE_TIME','en','Schedule time','2021-05-02') ,
( 'LABEL','ID_SCHEDULER_LIST','en','New cases scheduler','2014-01-15') ,
( 'LABEL','ID_SCHEDULER_LOG','en','Cases Scheduler Logs','2014-01-15') ,
( 'LABEL','ID_SCHEDULER_SUCCESS_CHANGE_STATUS','en','Case Scheduler status has been changed correctly.','2014-01-15') ,

View File

@@ -15,7 +15,6 @@ class TimerEvent extends Api
private $timerEvent;
private $arrayFieldIso8601 = [
'tmrevn_next_run_date',
'tmrevn_last_run_date',
'tmrevn_last_execution_date'
];