PMCORE-3824: solve conflicts
This commit is contained in:
@@ -810,7 +810,7 @@ class Bootstrap
|
|||||||
|
|
||||||
//First get Skin info
|
//First get Skin info
|
||||||
$filenameParts = explode("-", $filename);
|
$filenameParts = explode("-", $filename);
|
||||||
$skinName = $filenameParts[0];
|
$skinName = empty($filenameParts[0]) ? 'base' : $filenameParts[0];
|
||||||
$skinVariant = "skin";
|
$skinVariant = "skin";
|
||||||
|
|
||||||
if (isset($filenameParts[1])) {
|
if (isset($filenameParts[1])) {
|
||||||
@@ -833,10 +833,13 @@ class Bootstrap
|
|||||||
$configurationFile = PATH_CUSTOM_SKINS . $skinName . PATH_SEP . 'config.xml';
|
$configurationFile = PATH_CUSTOM_SKINS . $skinName . PATH_SEP . 'config.xml';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! is_file($configurationFile)) {
|
if (!is_file($configurationFile)) {
|
||||||
$configurationFile = Bootstrap::ExpandPath("skinEngine") . $skinName . PATH_SEP . 'config.xml';
|
$configurationFile = Bootstrap::ExpandPath("skinEngine") . $skinName . PATH_SEP . 'config.xml';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!file_exists($configurationFile)) {
|
||||||
|
$configurationFile = Bootstrap::ExpandPath("skinEngine") . 'base' . PATH_SEP . 'config.xml';
|
||||||
|
}
|
||||||
|
|
||||||
$mtime = date('U');
|
$mtime = date('U');
|
||||||
$gmt_mtime = gmdate("D, d M Y H:i:s", $mtime) . " GMT";
|
$gmt_mtime = gmdate("D, d M Y H:i:s", $mtime) . " GMT";
|
||||||
|
|||||||
@@ -810,7 +810,9 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
that.headings[item.field] = item.name;
|
that.headings[item.field] = item.name;
|
||||||
columns.push(item.field);
|
if(item.enableFilter){
|
||||||
|
columns.push(item.field);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
that.filterItems = newItems;
|
that.filterItems = newItems;
|
||||||
dt = that.formatDataResponse(response.data.data);
|
dt = that.formatDataResponse(response.data.data);
|
||||||
|
|||||||
@@ -26561,6 +26561,12 @@ msgstr "The mime type does not correspond to the permitted extension, please ver
|
|||||||
msgid "The change might cause data loss in the PM table. Do you want to continue?"
|
msgid "The change might cause data loss in the PM table. Do you want to continue?"
|
||||||
msgstr "The change might cause data loss in the PM table. Do you want to continue?"
|
msgstr "The change might cause data loss in the PM table. Do you want to continue?"
|
||||||
|
|
||||||
|
# TRANSLATION
|
||||||
|
# LABEL/ID_THE_PERMISSION_CAN_NOT_BE_UNASSIGNED_FROM_THIS_ROLE
|
||||||
|
#: LABEL/ID_THE_PERMISSION_CAN_NOT_BE_UNASSIGNED_FROM_THIS_ROLE
|
||||||
|
msgid "The permission can not be unassigned from this role."
|
||||||
|
msgstr "The permission can not be unassigned from this role."
|
||||||
|
|
||||||
# TRANSLATION
|
# TRANSLATION
|
||||||
# LABEL/ID_THE_PHP_FILES_EXECUTION_WAS_DISABLED
|
# LABEL/ID_THE_PHP_FILES_EXECUTION_WAS_DISABLED
|
||||||
#: LABEL/ID_THE_PHP_FILES_EXECUTION_WAS_DISABLED
|
#: LABEL/ID_THE_PHP_FILES_EXECUTION_WAS_DISABLED
|
||||||
|
|||||||
@@ -61404,6 +61404,7 @@ INSERT INTO TRANSLATION (TRN_CATEGORY,TRN_ID,TRN_LANG,TRN_VALUE,TRN_UPDATE_DATE
|
|||||||
( 'LABEL','ID_THE_MAXIMUM_VALUE_OF_THIS_FIELD_IS','en','The maximum value of this field is {0}.','2019-02-26') ,
|
( 'LABEL','ID_THE_MAXIMUM_VALUE_OF_THIS_FIELD_IS','en','The maximum value of this field is {0}.','2019-02-26') ,
|
||||||
( 'LABEL','ID_THE_MIMETYPE_EXTENSION_ERROR','en','The mime type does not correspond to the permitted extension, please verify your file.','2018-10-02') ,
|
( 'LABEL','ID_THE_MIMETYPE_EXTENSION_ERROR','en','The mime type does not correspond to the permitted extension, please verify your file.','2018-10-02') ,
|
||||||
( 'LABEL','ID_THE_NAME_CHANGE_MAY_CAUSE_DATA_LOSS','en','The change might cause data loss in the PM table. Do you want to continue?','2017-03-30') ,
|
( 'LABEL','ID_THE_NAME_CHANGE_MAY_CAUSE_DATA_LOSS','en','The change might cause data loss in the PM table. Do you want to continue?','2017-03-30') ,
|
||||||
|
( 'LABEL','ID_THE_PERMISSION_CAN_NOT_BE_UNASSIGNED_FROM_THIS_ROLE','en','The permission can not be unassigned from this role.','2022-04-20') ,
|
||||||
( 'LABEL','ID_THE_PHP_FILES_EXECUTION_WAS_DISABLED','en','The PHP files execution was disabled please contact the system administrator.','2018-04-20') ,
|
( 'LABEL','ID_THE_PHP_FILES_EXECUTION_WAS_DISABLED','en','The PHP files execution was disabled please contact the system administrator.','2018-04-20') ,
|
||||||
( 'LABEL','ID_THE_REASON_REASSIGN_USER_EMPTY','en','Please complete the reassign reason.','2016-10-20') ,
|
( 'LABEL','ID_THE_REASON_REASSIGN_USER_EMPTY','en','Please complete the reassign reason.','2016-10-20') ,
|
||||||
( 'LABEL','ID_THE_REPORT_TABLE_IS_REGENERATING_PLEASE_COME_BACK_IN_A_FEW_MINUTES','en','The report table is regenerating please come back in a few minutes.','2020-06-01') ,
|
( 'LABEL','ID_THE_REPORT_TABLE_IS_REGENERATING_PLEASE_COME_BACK_IN_A_FEW_MINUTES','en','The report table is regenerating please come back in a few minutes.','2020-06-01') ,
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ switch ($actionAjax) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$response = new stdclass();
|
$response = new stdclass();
|
||||||
$response->data = DateTime::convertUtcToTimeZone($process);
|
$response->data = $process;
|
||||||
$response->totalCount = $totalCount;
|
$response->totalCount = $totalCount;
|
||||||
|
|
||||||
echo G::json_encode($response);
|
echo G::json_encode($response);
|
||||||
|
|||||||
@@ -1,27 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
|
||||||
* data_rolesPermissions.php
|
|
||||||
*
|
|
||||||
* ProcessMaker Open Source Edition
|
|
||||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
|
||||||
*
|
|
||||||
* This program is free software: you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU Affero General Public License as
|
|
||||||
* published by the Free Software Foundation, either version 3 of the
|
|
||||||
* License, or (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU Affero General Public License for more details.
|
|
||||||
*
|
|
||||||
* You should have received a copy of the GNU Affero General Public License
|
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
*
|
|
||||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
|
||||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
$filter = new InputFilter();
|
$filter = new InputFilter();
|
||||||
$_GET = $filter->xssFilterHard($_GET);
|
$_GET = $filter->xssFilterHard($_GET);
|
||||||
@@ -31,20 +8,22 @@ $TYPE_DATA = $_GET["type"];
|
|||||||
|
|
||||||
global $RBAC;
|
global $RBAC;
|
||||||
|
|
||||||
$filter = (isset( $_REQUEST['textFilter'] )) ? $_REQUEST['textFilter'] : '';
|
$filter = (isset($_REQUEST['textFilter'])) ? $_REQUEST['textFilter'] : '';
|
||||||
|
|
||||||
//BUG 7554: erik/ hook for existents environments that have not PM_CANCELCASE
|
//BUG 7554: erik/ hook for existents environments that have not PM_CANCELCASE
|
||||||
if ($RBAC->permissionsObj->loadByCode( 'PM_CANCELCASE' ) === false) {
|
if ($RBAC->permissionsObj->loadByCode('PM_CANCELCASE') === false) {
|
||||||
$RBAC->permissionsObj->create( array ('PER_CODE' => 'PM_CANCELCASE','PER_CREATE_DATE' => date( 'Y-m-d H:i:s' )
|
$RBAC->permissionsObj->create(array('PER_CODE' => 'PM_CANCELCASE', 'PER_CREATE_DATE' => date('Y-m-d H:i:s')
|
||||||
) );
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($TYPE_DATA == 'list')
|
if ($TYPE_DATA == 'list') {
|
||||||
$oDataset = $RBAC->getRolePermissions( $ROL_UID, $filter, 1 );
|
$oDataset = $RBAC->getRolePermissions($ROL_UID, $filter, 1);
|
||||||
if ($TYPE_DATA == 'show')
|
}
|
||||||
$oDataset = $RBAC->getAllPermissions( $ROL_UID, $RBAC->sSystem, $filter, 1 );
|
if ($TYPE_DATA == 'show') {
|
||||||
|
$oDataset = $RBAC->getAllPermissions($ROL_UID, $RBAC->sSystem, $filter, 1);
|
||||||
|
}
|
||||||
|
|
||||||
$rows = Array ();
|
$rows = [];
|
||||||
$per = new RolesPermissions();
|
$per = new RolesPermissions();
|
||||||
while ($oDataset->next()) {
|
while ($oDataset->next()) {
|
||||||
$row = $oDataset->getRow();
|
$row = $oDataset->getRow();
|
||||||
@@ -53,5 +32,7 @@ while ($oDataset->next()) {
|
|||||||
$rows[] = $row;
|
$rows[] = $row;
|
||||||
}
|
}
|
||||||
|
|
||||||
echo '{permissions: ' . G::json_encode( $rows ) . '}';
|
$result = [
|
||||||
|
'permissions' => $rows
|
||||||
|
];
|
||||||
|
echo G::json_encode($result);
|
||||||
|
|||||||
@@ -332,21 +332,26 @@ class AuditLog
|
|||||||
*/
|
*/
|
||||||
private function getFiles($path, $pattern = '', $dir = 'ASC')
|
private function getFiles($path, $pattern = '', $dir = 'ASC')
|
||||||
{
|
{
|
||||||
$finder = new Finder();
|
try {
|
||||||
$finder->files()
|
$finder = new Finder();
|
||||||
->in($path)
|
$finder->files()
|
||||||
->name($pattern);
|
->in($path)
|
||||||
$files = iterator_to_array($finder->getIterator());
|
->name($pattern);
|
||||||
uasort($files, function ($a, $b) use ($dir) {
|
$files = iterator_to_array($finder->getIterator());
|
||||||
$name1 = $a->getFilename();
|
uasort($files, function ($a, $b) use ($dir) {
|
||||||
$name2 = $b->getFilename();
|
$name1 = $a->getFilename();
|
||||||
if ($dir === 'ASC') {
|
$name2 = $b->getFilename();
|
||||||
return strcmp($name1, $name2);
|
if ($dir === 'ASC') {
|
||||||
} else {
|
return strcmp($name1, $name2);
|
||||||
return strcmp($name2, $name1);
|
} else {
|
||||||
}
|
return strcmp($name2, $name1);
|
||||||
});
|
}
|
||||||
return $files;
|
});
|
||||||
|
return $files;
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// Return array empty when the path does not exist
|
||||||
|
return [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1231,7 +1231,7 @@ class Cases extends Api
|
|||||||
$case->setFormatFieldNameInUppercase(false);
|
$case->setFormatFieldNameInUppercase(false);
|
||||||
$response = $case->getTasks($appUid);
|
$response = $case->getTasks($appUid);
|
||||||
|
|
||||||
return DateTime::convertUtcToIso8601($response, $this->arrayFieldIso8601);
|
return DateTime::convertUtcToTimeZone($response);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,13 +104,24 @@ GridByDefaultX = function(){
|
|||||||
assignedUGrid.store.load();
|
assignedUGrid.store.load();
|
||||||
};
|
};
|
||||||
|
|
||||||
//edit permissions action
|
/**
|
||||||
EditPermissionsAction = function(){
|
* Edit permissions action
|
||||||
availableGrid.show();
|
* @returns {void}
|
||||||
buttonsPanel.show();
|
*/
|
||||||
editPermissionsButton.disable();
|
EditPermissionsAction = function () {
|
||||||
//cancelEditPermissionsButton.show();
|
availableGrid.show();
|
||||||
PermissionsPanel.doLayout();
|
buttonsPanel.show();
|
||||||
|
editPermissionsButton.disable();
|
||||||
|
PermissionsPanel.doLayout();
|
||||||
|
|
||||||
|
//if the role is administrator these buttons must be disabled.
|
||||||
|
if (ROLES.ROL_UID === pm_admin) {
|
||||||
|
Ext.getCmp('removeButtonAll').disable();
|
||||||
|
Ext.getCmp('assignButtonAll').disable();
|
||||||
|
} else {
|
||||||
|
Ext.getCmp('removeButtonAll').enable();
|
||||||
|
Ext.getCmp('assignButtonAll').enable();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
EditPermissionsContentsAction = function(){
|
EditPermissionsContentsAction = function(){
|
||||||
@@ -862,22 +873,31 @@ SavePermissionsRole = function(arr_per, function_success, function_failure){
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//REMOVE PERMISSION FROM A ROLE
|
/**
|
||||||
DeletePermissionsRole = function(arr_per, function_success, function_failure){
|
* Remove permission from a role.
|
||||||
var sw_response;
|
* @param {array} permissions
|
||||||
viewport.getEl().mask(_('ID_PROCESSING'));
|
* @param {function} success
|
||||||
Ext.Ajax.request({
|
* @param {function} failure
|
||||||
url: 'roles_Ajax',
|
* @returns {void}
|
||||||
params: {request: 'deletePermissionToRoleMultiple', ROL_UID: ROLES.ROL_UID, PER_UID: arr_per.join(',')},
|
*/
|
||||||
success: function(){
|
DeletePermissionsRole = function (permissions, success, failure) {
|
||||||
function_success();
|
if (permissions.length === 0) {
|
||||||
viewport.getEl().unmask();
|
return;
|
||||||
},
|
}
|
||||||
failure: function(){
|
var sw_response;
|
||||||
function_failure();
|
viewport.getEl().mask(_('ID_PROCESSING'));
|
||||||
viewport.getEl().unmask();
|
Ext.Ajax.request({
|
||||||
}
|
url: 'roles_Ajax',
|
||||||
});
|
params: {request: 'deletePermissionToRoleMultiple', ROL_UID: ROLES.ROL_UID, PER_UID: permissions.join(',')},
|
||||||
|
success: function () {
|
||||||
|
success();
|
||||||
|
viewport.getEl().unmask();
|
||||||
|
},
|
||||||
|
failure: function () {
|
||||||
|
failure();
|
||||||
|
viewport.getEl().unmask();
|
||||||
|
}
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
//AssignButton Functionality
|
//AssignButton Functionality
|
||||||
@@ -890,15 +910,23 @@ AssignPermissionAction = function(){
|
|||||||
SavePermissionsRole(arrAux,RefreshPermissions,FailureProcess);
|
SavePermissionsRole(arrAux,RefreshPermissions,FailureProcess);
|
||||||
};
|
};
|
||||||
|
|
||||||
//RemoveButton Functionality
|
/**
|
||||||
RemovePermissionAction = function(){
|
* RemoveButton Functionality
|
||||||
|
* @returns {void}
|
||||||
|
*/
|
||||||
|
RemovePermissionAction = function () {
|
||||||
|
if (ROLES.ROL_UID === pm_admin) {
|
||||||
|
var message = _('ID_THE_PERMISSION_CAN_NOT_BE_UNASSIGNED_FROM_THIS_ROLE');
|
||||||
|
Ext.Msg.alert(_('ID_INFORMATION'), message);
|
||||||
|
return;
|
||||||
|
}
|
||||||
rowsSelected = assignedGrid.getSelectionModel().getSelections();
|
rowsSelected = assignedGrid.getSelectionModel().getSelections();
|
||||||
var arrAux = new Array();
|
var arrAux = new Array();
|
||||||
var sw;
|
var sw;
|
||||||
for(var a=0; a < rowsSelected.length; a++){
|
for (var a = 0; a < rowsSelected.length; a++) {
|
||||||
sw = true;
|
sw = true;
|
||||||
if (ROLES.ROL_UID == pm_admin) {
|
if (ROLES.ROL_UID == pm_admin) {
|
||||||
for (var i=0; i < permissionsAdmin.length; i++)
|
for (var i = 0; i < permissionsAdmin.length; i++)
|
||||||
{
|
{
|
||||||
if (permissionsAdmin[i]['PER_UID'] == rowsSelected[a].get('PER_UID')) {
|
if (permissionsAdmin[i]['PER_UID'] == rowsSelected[a].get('PER_UID')) {
|
||||||
sw = false;
|
sw = false;
|
||||||
@@ -910,7 +938,7 @@ RemovePermissionAction = function(){
|
|||||||
arrAux[a] = rowsSelected[a].get('PER_UID');
|
arrAux[a] = rowsSelected[a].get('PER_UID');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DeletePermissionsRole(arrAux,RefreshPermissions,FailureProcess);
|
DeletePermissionsRole(arrAux, RefreshPermissions, FailureProcess);
|
||||||
};
|
};
|
||||||
|
|
||||||
//AssignALLButton Functionality
|
//AssignALLButton Functionality
|
||||||
|
|||||||
Reference in New Issue
Block a user