本文整理汇总了PHP中Rights::getRights方法的典型用法代码示例。如果您正苦于以下问题:PHP Rights::getRights方法的具体用法?PHP Rights::getRights怎么用?PHP Rights::getRights使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rights
的用法示例。
在下文中一共展示了Rights::getRights方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isset
$_SESSION['hp-userType'] = 'ESS';
}
break;
case 'hr':
$_SESSION['hp-module'] = 'PIM';
$_SESSION['hp-action'] = isset($_POST['pane']) ? $_POST['pane'] : '';
break;
case 'leave':
$_SESSION['hp-module'] = 'Leave';
$_SESSION['hp-action'] = $_GET['action'];
break;
}
/* Help page session variables: End */
switch ($moduletype) {
case 'admin':
$locRights = $rights->getRights($_SESSION['userGroup'], Admin);
break;
case 'hr':
$locRights = $rights->getRights($_SESSION['userGroup'], PIM);
break;
case 'rep':
$locRights = $rights->getRights($_SESSION['userGroup'], REP);
break;
case 'leave':
$locRights = $rights->getRights($_SESSION['userGroup'], LEAVE);
break;
case 'timeMod':
$locRights = $rights->getRights($_SESSION['userGroup'], TIMEMOD);
break;
case 'benefits':
include ROOT_PATH . '/lib/controllers/Benefits.inc.php';
示例2: Rights
require_once ROOT_PATH . '/lib/models/maintenance/UserGroups.php';
require_once ROOT_PATH . '/lib/common/CommonFunctions.php';
require_once ROOT_PATH . '/lib/common/Config.php';
$_SESSION['path'] = ROOT_PATH;
/* For checking TimesheetPeriodStartDaySet status : Begins */
if (Config::getTimePeriodSet()) {
$_SESSION['timePeriodSet'] = 'Yes';
} else {
$_SESSION['timePeriodSet'] = 'No';
}
/* For checking TimesheetPeriodStartDaySet status : Ends */
if ($_SESSION['isAdmin'] == 'Yes') {
$rights = new Rights();
// $arrRights=array('add'=> true , 'edit'=> true, 'delete'=> true, 'view'=> true);
foreach ($arrAllRights as $moduleCode => $currRights) {
$arrAllRights[$moduleCode] = $rights->getRights($_SESSION['userGroup'], $moduleCode);
}
$ugroup = new UserGroups();
$ugDet = $ugroup->filterUserGroups($_SESSION['userGroup']);
$arrRights['repDef'] = $ugDet[0][2] == '1' ? true : false;
} else {
/* Assign supervisors edit and view rights to the PIM
* They have PIM rights over their subordinates, but they cannot add/delete
* employees. But they have add/delete rights in the employee details page.
*/
if ($_SESSION['isSupervisor']) {
$arrAllRights[PIM] = array('add' => false, 'edit' => true, 'delete' => false, 'view' => true);
}
/*
* Assign Manager's access to recruitment module
*/