La información personal de un usuario Administrador se ve en modo view.

HOR-788
La información personal de un usuario Administrador se ve en modo view.

HOR-788
La información personal de un usuario Administrador se ve en modo view.

HOR-788
La información personal de un usuario Administrador se ve en modo view.

HOR-788
La información personal de un usuario Administrador se ve en modo view.
This commit is contained in:
dheeyi william
2016-07-18 10:42:38 -04:00
parent 7592f29485
commit bc200f1a08
8 changed files with 437 additions and 64 deletions

View File

@@ -471,6 +471,11 @@ class Roles extends BaseRoles {
G::auditLog("DeleteUserToRole", "Delete user ".$user['USR_USERNAME']." (".$USR_UID.") to Role ".$rol['ROL_NAME']." (".$ROL_UID.") ");
}
/**
* @param $roleUid
* @return ResultSet
* @throws Exception
*/
function getRolePermissionsByPerUid($roleUid){
try {
$criteria = new Criteria();
@@ -487,6 +492,36 @@ class Roles extends BaseRoles {
throw $e;
}
}
/**
* Checks a permission is assigned to a Role
* @param $ROL_UID
* @param $PER_UID
* @return bool
* @throws Exception
*/
function getPermissionAssignedRole($ROL_UID, $PER_UID)
{
try {
$criteria = new Criteria();
$criteria->addSelectColumn(RolesPermissionsPeer::ROL_UID);
$criteria->addSelectColumn(RolesPermissionsPeer::PER_UID);
$criteria->add(RolesPermissionsPeer::ROL_UID, $ROL_UID, Criteria::EQUAL);
$criteria->add(RolesPermissionsPeer::PER_UID, $PER_UID, Criteria::EQUAL);
$oDataset = RolesPermissionsPeer::doSelectRS($criteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
if($aRowRP = $oDataset->getRow()){
return true;
}
return false;
} catch (exception $e) {
throw $e;
}
}
function getRolePermissions($ROL_UID, $filter='', $status=null) {
try {
$criteria = new Criteria();

View File

@@ -37,7 +37,31 @@ INSERT INTO `RBAC_PERMISSIONS` VALUES
('00000000000000000000000000000036','PM_DELETE_PROCESS_CASES','2016-03-01 00:00:00','2016-03-01 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000037','PM_EDITPERSONALINFO_CALENDAR','2016-03-01 00:00:00','2016-03-01 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000038','PM_UNCANCELCASE','2016-06-14 00:00:00','2016-06-14 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000039','PM_REST_API_APPLICATIONS','2016-06-14 00:00:00','2016-06-14 00:00:00',1,'00000000000000000000000000000002');
('00000000000000000000000000000039','PM_REST_API_APPLICATIONS','2016-06-14 00:00:00','2016-06-14 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000040','PM_EDIT_USER_PROFILE_FIRST_NAME','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000041','PM_EDIT_USER_PROFILE_LAST_NAME','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000042','PM_EDIT_USER_PROFILE_USERNAME','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000043','PM_EDIT_USER_PROFILE_EMAIL','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000044','PM_EDIT_USER_PROFILE_ADDRESS','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000045','PM_EDIT_USER_PROFILE_ZIP_CODE','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000046','PM_EDIT_USER_PROFILE_COUNTRY','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000047','PM_EDIT_USER_PROFILE_STATE_OR_REGION','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000048','PM_EDIT_USER_PROFILE_LOCATION','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000049','PM_EDIT_USER_PROFILE_PHONE','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000050','PM_EDIT_USER_PROFILE_POSITION','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000051','PM_EDIT_USER_PROFILE_REPLACED_BY','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000052','PM_EDIT_USER_PROFILE_EXPIRATION_DATE','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000053','PM_EDIT_USER_PROFILE_CALENDAR','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000054','PM_EDIT_USER_PROFILE_STATUS','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000055','PM_EDIT_USER_PROFILE_ROLE','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000056','PM_EDIT_USER_PROFILE_TIME_ZONE','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000057','PM_EDIT_USER_PROFILE_DEFAULT_LANGUAGE','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000058','PM_EDIT_USER_PROFILE_COSTS','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000059','PM_EDIT_USER_PROFILE_PASSWORD','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000060','PM_EDIT_USER_PROFILE_USER_MUST_CHANGE_PASSWORD_AT_NEXT_LOGON','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000061','PM_EDIT_USER_PROFILE_PHOTO','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000062','PM_EDIT_USER_PROFILE_DEFAULT_MAIN_MENU_OPTIONS','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002'),
('00000000000000000000000000000063','PM_EDIT_USER_PROFILE_DEFAULT_CASES_MENU_OPTIONS','2016-07-18 00:00:00','2016-07-18 00:00:00',1,'00000000000000000000000000000002');
INSERT INTO `RBAC_ROLES` VALUES
('00000000000000000000000000000001','','00000000000000000000000000000001','RBAC_ADMIN','2007-07-31 19:10:22','2007-08-03 12:24:36',1),
@@ -86,8 +110,47 @@ INSERT INTO `RBAC_ROLES_PERMISSIONS` VALUES
('00000000000000000000000000000002','00000000000000000000000000000037'),
('00000000000000000000000000000002','00000000000000000000000000000038'),
('00000000000000000000000000000002','00000000000000000000000000000039'),
('00000000000000000000000000000002','00000000000000000000000000000040'),
('00000000000000000000000000000002','00000000000000000000000000000041'),
('00000000000000000000000000000002','00000000000000000000000000000042'),
('00000000000000000000000000000002','00000000000000000000000000000043'),
('00000000000000000000000000000002','00000000000000000000000000000044'),
('00000000000000000000000000000002','00000000000000000000000000000045'),
('00000000000000000000000000000002','00000000000000000000000000000046'),
('00000000000000000000000000000002','00000000000000000000000000000047'),
('00000000000000000000000000000002','00000000000000000000000000000048'),
('00000000000000000000000000000002','00000000000000000000000000000049'),
('00000000000000000000000000000002','00000000000000000000000000000050'),
('00000000000000000000000000000002','00000000000000000000000000000051'),
('00000000000000000000000000000002','00000000000000000000000000000052'),
('00000000000000000000000000000002','00000000000000000000000000000053'),
('00000000000000000000000000000002','00000000000000000000000000000054'),
('00000000000000000000000000000002','00000000000000000000000000000055'),
('00000000000000000000000000000002','00000000000000000000000000000056'),
('00000000000000000000000000000002','00000000000000000000000000000057'),
('00000000000000000000000000000002','00000000000000000000000000000058'),
('00000000000000000000000000000002','00000000000000000000000000000059'),
('00000000000000000000000000000002','00000000000000000000000000000060'),
('00000000000000000000000000000002','00000000000000000000000000000061'),
('00000000000000000000000000000002','00000000000000000000000000000062'),
('00000000000000000000000000000002','00000000000000000000000000000063'),
('00000000000000000000000000000003','00000000000000000000000000000001'),
('00000000000000000000000000000003','00000000000000000000000000000005'),
('00000000000000000000000000000003','00000000000000000000000000000040'),
('00000000000000000000000000000003','00000000000000000000000000000041'),
('00000000000000000000000000000003','00000000000000000000000000000042'),
('00000000000000000000000000000003','00000000000000000000000000000043'),
('00000000000000000000000000000003','00000000000000000000000000000044'),
('00000000000000000000000000000003','00000000000000000000000000000045'),
('00000000000000000000000000000003','00000000000000000000000000000046'),
('00000000000000000000000000000003','00000000000000000000000000000047'),
('00000000000000000000000000000003','00000000000000000000000000000048'),
('00000000000000000000000000000003','00000000000000000000000000000049'),
('00000000000000000000000000000003','00000000000000000000000000000053'),
('00000000000000000000000000000003','00000000000000000000000000000056'),
('00000000000000000000000000000003','00000000000000000000000000000057'),
('00000000000000000000000000000003','00000000000000000000000000000059'),
('00000000000000000000000000000003','00000000000000000000000000000061'),
('00000000000000000000000000000004','00000000000000000000000000000001'),
('00000000000000000000000000000004','00000000000000000000000000000003'),
('00000000000000000000000000000004','00000000000000000000000000000005'),
@@ -122,7 +185,31 @@ INSERT INTO `RBAC_ROLES_PERMISSIONS` VALUES
('00000000000000000000000000000004','00000000000000000000000000000036'),
('00000000000000000000000000000004','00000000000000000000000000000037'),
('00000000000000000000000000000004','00000000000000000000000000000038'),
('00000000000000000000000000000004','00000000000000000000000000000039');
('00000000000000000000000000000004','00000000000000000000000000000039'),
('00000000000000000000000000000004','00000000000000000000000000000040'),
('00000000000000000000000000000004','00000000000000000000000000000041'),
('00000000000000000000000000000004','00000000000000000000000000000042'),
('00000000000000000000000000000004','00000000000000000000000000000043'),
('00000000000000000000000000000004','00000000000000000000000000000044'),
('00000000000000000000000000000004','00000000000000000000000000000045'),
('00000000000000000000000000000004','00000000000000000000000000000046'),
('00000000000000000000000000000004','00000000000000000000000000000047'),
('00000000000000000000000000000004','00000000000000000000000000000048'),
('00000000000000000000000000000004','00000000000000000000000000000049'),
('00000000000000000000000000000004','00000000000000000000000000000050'),
('00000000000000000000000000000004','00000000000000000000000000000051'),
('00000000000000000000000000000004','00000000000000000000000000000052'),
('00000000000000000000000000000004','00000000000000000000000000000053'),
('00000000000000000000000000000004','00000000000000000000000000000054'),
('00000000000000000000000000000004','00000000000000000000000000000055'),
('00000000000000000000000000000004','00000000000000000000000000000056'),
('00000000000000000000000000000004','00000000000000000000000000000057'),
('00000000000000000000000000000004','00000000000000000000000000000058'),
('00000000000000000000000000000004','00000000000000000000000000000059'),
('00000000000000000000000000000004','00000000000000000000000000000060'),
('00000000000000000000000000000004','00000000000000000000000000000061'),
('00000000000000000000000000000004','00000000000000000000000000000062'),
('00000000000000000000000000000004','00000000000000000000000000000063');
INSERT INTO `RBAC_SYSTEMS` VALUES ('00000000000000000000000000000001','RBAC','2007-07-31 19:10:22','2007-08-03 12:24:36',1),('00000000000000000000000000000002','PROCESSMAKER','2007-07-31 19:10:22','2007-08-03 12:24:36',1);
INSERT INTO `RBAC_USERS` VALUES ('00000000000000000000000000000001','admin','21232f297a57a5a743894a0e4a801fc3','Administrator','','admin@processmaker.com','2020-01-01','2007-08-03 12:24:36','2008-02-13 07:24:07',1,'MYSQL','00000000000000000000000000000000','','');