PMCORE-3824: solve conflicts
This commit is contained in:
@@ -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?"
|
||||
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
|
||||
# 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_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_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_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') ,
|
||||
|
||||
@@ -49,7 +49,7 @@ switch ($actionAjax) {
|
||||
}
|
||||
|
||||
$response = new stdclass();
|
||||
$response->data = DateTime::convertUtcToTimeZone($process);
|
||||
$response->data = $process;
|
||||
$response->totalCount = $totalCount;
|
||||
|
||||
echo G::json_encode($response);
|
||||
|
||||
@@ -1,27 +1,4 @@
|
||||
<?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();
|
||||
$_GET = $filter->xssFilterHard($_GET);
|
||||
@@ -31,20 +8,22 @@ $TYPE_DATA = $_GET["type"];
|
||||
|
||||
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
|
||||
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' )
|
||||
) );
|
||||
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')
|
||||
));
|
||||
}
|
||||
|
||||
if ($TYPE_DATA == 'list')
|
||||
$oDataset = $RBAC->getRolePermissions( $ROL_UID, $filter, 1 );
|
||||
if ($TYPE_DATA == 'show')
|
||||
$oDataset = $RBAC->getAllPermissions( $ROL_UID, $RBAC->sSystem, $filter, 1 );
|
||||
if ($TYPE_DATA == 'list') {
|
||||
$oDataset = $RBAC->getRolePermissions($ROL_UID, $filter, 1);
|
||||
}
|
||||
if ($TYPE_DATA == 'show') {
|
||||
$oDataset = $RBAC->getAllPermissions($ROL_UID, $RBAC->sSystem, $filter, 1);
|
||||
}
|
||||
|
||||
$rows = Array ();
|
||||
$rows = [];
|
||||
$per = new RolesPermissions();
|
||||
while ($oDataset->next()) {
|
||||
$row = $oDataset->getRow();
|
||||
@@ -53,5 +32,7 @@ while ($oDataset->next()) {
|
||||
$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')
|
||||
{
|
||||
$finder = new Finder();
|
||||
$finder->files()
|
||||
->in($path)
|
||||
->name($pattern);
|
||||
$files = iterator_to_array($finder->getIterator());
|
||||
uasort($files, function ($a, $b) use ($dir) {
|
||||
$name1 = $a->getFilename();
|
||||
$name2 = $b->getFilename();
|
||||
if ($dir === 'ASC') {
|
||||
return strcmp($name1, $name2);
|
||||
} else {
|
||||
return strcmp($name2, $name1);
|
||||
}
|
||||
});
|
||||
return $files;
|
||||
try {
|
||||
$finder = new Finder();
|
||||
$finder->files()
|
||||
->in($path)
|
||||
->name($pattern);
|
||||
$files = iterator_to_array($finder->getIterator());
|
||||
uasort($files, function ($a, $b) use ($dir) {
|
||||
$name1 = $a->getFilename();
|
||||
$name2 = $b->getFilename();
|
||||
if ($dir === 'ASC') {
|
||||
return strcmp($name1, $name2);
|
||||
} else {
|
||||
return strcmp($name2, $name1);
|
||||
}
|
||||
});
|
||||
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);
|
||||
$response = $case->getTasks($appUid);
|
||||
|
||||
return DateTime::convertUtcToIso8601($response, $this->arrayFieldIso8601);
|
||||
return DateTime::convertUtcToTimeZone($response);
|
||||
} catch (Exception $e) {
|
||||
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
|
||||
}
|
||||
|
||||
@@ -104,13 +104,24 @@ GridByDefaultX = function(){
|
||||
assignedUGrid.store.load();
|
||||
};
|
||||
|
||||
//edit permissions action
|
||||
EditPermissionsAction = function(){
|
||||
availableGrid.show();
|
||||
buttonsPanel.show();
|
||||
editPermissionsButton.disable();
|
||||
//cancelEditPermissionsButton.show();
|
||||
PermissionsPanel.doLayout();
|
||||
/**
|
||||
* Edit permissions action
|
||||
* @returns {void}
|
||||
*/
|
||||
EditPermissionsAction = function () {
|
||||
availableGrid.show();
|
||||
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(){
|
||||
@@ -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){
|
||||
var sw_response;
|
||||
viewport.getEl().mask(_('ID_PROCESSING'));
|
||||
Ext.Ajax.request({
|
||||
url: 'roles_Ajax',
|
||||
params: {request: 'deletePermissionToRoleMultiple', ROL_UID: ROLES.ROL_UID, PER_UID: arr_per.join(',')},
|
||||
success: function(){
|
||||
function_success();
|
||||
viewport.getEl().unmask();
|
||||
},
|
||||
failure: function(){
|
||||
function_failure();
|
||||
viewport.getEl().unmask();
|
||||
}
|
||||
});
|
||||
/**
|
||||
* Remove permission from a role.
|
||||
* @param {array} permissions
|
||||
* @param {function} success
|
||||
* @param {function} failure
|
||||
* @returns {void}
|
||||
*/
|
||||
DeletePermissionsRole = function (permissions, success, failure) {
|
||||
if (permissions.length === 0) {
|
||||
return;
|
||||
}
|
||||
var sw_response;
|
||||
viewport.getEl().mask(_('ID_PROCESSING'));
|
||||
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
|
||||
@@ -890,15 +910,23 @@ AssignPermissionAction = function(){
|
||||
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();
|
||||
var arrAux = new Array();
|
||||
var sw;
|
||||
for(var a=0; a < rowsSelected.length; a++){
|
||||
for (var a = 0; a < rowsSelected.length; a++) {
|
||||
sw = true;
|
||||
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')) {
|
||||
sw = false;
|
||||
@@ -910,7 +938,7 @@ RemovePermissionAction = function(){
|
||||
arrAux[a] = rowsSelected[a].get('PER_UID');
|
||||
}
|
||||
}
|
||||
DeletePermissionsRole(arrAux,RefreshPermissions,FailureProcess);
|
||||
DeletePermissionsRole(arrAux, RefreshPermissions, FailureProcess);
|
||||
};
|
||||
|
||||
//AssignALLButton Functionality
|
||||
|
||||
Reference in New Issue
Block a user