BUG 8444 Remove permission PM_REPORTS, since it no longer serves any purpose SOLVED
- The permission PM_REPORTS cannot be removed because many projects already used (plugins made by projects), then the permision has changed to status inactive and in new installations will be hidden in the permision administrator module
This commit is contained in:
@@ -738,8 +738,8 @@ class RBAC
|
||||
* @param string $ROL_UID
|
||||
* @return $this->rolesObj->getRolePermissions
|
||||
*/
|
||||
function getRolePermissions($ROL_UID, $filter=''){
|
||||
return $this->rolesObj->getRolePermissions($ROL_UID,$filter);
|
||||
function getRolePermissions($ROL_UID, $filter='', $status=null){
|
||||
return $this->rolesObj->getRolePermissions($ROL_UID, $filter, $status);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -752,8 +752,8 @@ class RBAC
|
||||
* @param string $PER_SYSTEM
|
||||
* @return $this->rolesObj->getAllPermissions
|
||||
*/
|
||||
function getAllPermissions($ROL_UID,$PER_SYSTEM="",$filter=''){
|
||||
return $this->rolesObj->getAllPermissions($ROL_UID,$PER_SYSTEM,$filter);
|
||||
function getAllPermissions($ROL_UID, $PER_SYSTEM="", $filter='', $status=null){
|
||||
return $this->rolesObj->getAllPermissions($ROL_UID, $PER_SYSTEM, $filter, $status);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -518,7 +518,7 @@ class Roles extends BaseRoles {
|
||||
UsersRolesPeer::doDelete($crit);
|
||||
}
|
||||
|
||||
function getRolePermissions($ROL_UID, $filter='') {
|
||||
function getRolePermissions($ROL_UID, $filter='', $status=null) {
|
||||
try {
|
||||
$criteria = new Criteria();
|
||||
$criteria->addSelectColumn(RolesPeer::ROL_UID);
|
||||
@@ -538,10 +538,14 @@ class Roles extends BaseRoles {
|
||||
$criteria->addJoin(RolesPeer::ROL_UID, RolesPermissionsPeer::ROL_UID);
|
||||
$criteria->addJoin(RolesPermissionsPeer::PER_UID, PermissionsPeer::PER_UID);
|
||||
|
||||
if ($filter != ''){
|
||||
if ($filter != '') {
|
||||
$criteria->add(PermissionsPeer::PER_CODE, '%'.$filter.'%',Criteria::LIKE);
|
||||
}
|
||||
|
||||
if (!is_null($status) && ($status == 1 || $status == 0)) {
|
||||
$criteria->add(PermissionsPeer::PER_STATUS, $status);
|
||||
}
|
||||
|
||||
$oDataset = RolesPeer::doSelectRS($criteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
return $oDataset;
|
||||
@@ -551,7 +555,7 @@ class Roles extends BaseRoles {
|
||||
}
|
||||
}
|
||||
|
||||
function getAllPermissions($ROL_UID, $PER_SYSTEM = "", $filter='') {
|
||||
function getAllPermissions($ROL_UID, $PER_SYSTEM = "", $filter='', $status=null) {
|
||||
try {
|
||||
$c = new Criteria();
|
||||
$c->addSelectColumn(PermissionsPeer::PER_UID);
|
||||
@@ -587,6 +591,10 @@ class Roles extends BaseRoles {
|
||||
$criteria->add(PermissionsPeer::PER_CODE, '%'.$filter.'%',Criteria::LIKE);
|
||||
}
|
||||
|
||||
if (!is_null($status) && ($status == 1 || $status == 0)) {
|
||||
$criteria->add(PermissionsPeer::PER_STATUS, $status);
|
||||
}
|
||||
|
||||
$oDataset = PermissionsPeer::doSelectRS($criteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
return $oDataset;
|
||||
|
||||
@@ -35,8 +35,8 @@ 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);
|
||||
if ($TYPE_DATA=='show') $oDataset = $RBAC->getAllPermissions($ROL_UID,$RBAC->sSystem,$filter);
|
||||
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();
|
||||
while($oDataset->next()){
|
||||
|
||||
Reference in New Issue
Block a user