This commit is contained in:
Ronald Quenta
2017-08-06 14:46:40 -04:00
parent e0c81c4662
commit bf34ab8778
3 changed files with 20 additions and 2 deletions

View File

@@ -1981,7 +1981,7 @@ class G
*
* @return void
*/
public function SendTemporalMessage ($msgID, $strType, $sType = 'LABEL', $time = null, $width = null, $customLabels = null)
public static function SendTemporalMessage ($msgID, $strType, $sType = 'LABEL', $time = null, $width = null, $customLabels = null)
{
if (isset( $width )) {
$_SESSION['G_MESSAGE_WIDTH'] = $width;

View File

@@ -144,8 +144,10 @@ class RBAC
'getProcessArray' => array('PM_ALLCASES'),
'getProcesses' => array('PM_ALLCASES'),
'getUsers' => array('PM_ALLCASES')
),
'emailsAjax.php' => array(
'MessageList' => array('PM_USERS')
)
);
}

View File

@@ -6,6 +6,22 @@ require_once 'classes/model/AppMessage.php';
require_once 'classes/model/AppDelegation.php';
require_once 'classes/model/Application.php';
/** @var RBAC $RBAC */
global $RBAC;
switch ($RBAC->userCanAccess('PM_LOGIN')) {
case -2:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
case -1:
G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
G::header('location: ../login/login');
die();
break;
}
$RBAC->allows(basename(__FILE__), $req);
switch($req){
case 'MessageList':
$start = (isset($_REQUEST['start']))? $_REQUEST['start'] : '0';