This commit is contained in:
Dennis Eichhorn 2018-08-17 20:02:29 +02:00
parent d72cccba8a
commit d96e91ebf7
2 changed files with 54 additions and 0 deletions

View File

@ -1,30 +1,53 @@
<?php
use phpOMS\Router\RouteVerb;
use phpOMS\Account\PermissionType;
use Modules\HumanResourceManagement\Models\PermissionState;
use Modules\HumanResourceManagement\Controller;
return [
'^.*/backend/hr/staff/list.*$' => [
[
'dest' => '\Modules\HumanResourceManagement\Controller:viewHrStaffList',
'verb' => RouteVerb::GET,
'permission' => [
'module' => Controller::MODULE_NAME,
'type' => PermissionType::READ,
'state' => PermissionState::HR,
],
],
],
'^.*/backend/hr/staff/profile.*$' => [
[
'dest' => '\Modules\HumanResourceManagement\Controller:viewHrStaffProfile',
'verb' => RouteVerb::GET,
'permission' => [
'module' => Controller::MODULE_NAME,
'type' => PermissionType::READ,
'state' => PermissionState::HR,
],
],
],
'^.*/backend/hr/staff/create.*$' => [
[
'dest' => '\Modules\HumanResourceManagement\Controller:viewHrStaffCreate',
'verb' => RouteVerb::GET,
'permission' => [
'module' => Controller::MODULE_NAME,
'type' => PermissionType::CREATE,
'state' => PermissionState::HR,
],
],
],
'^.*/backend/hr/department/list.*$' => [
[
'dest' => '\Modules\HumanResourceManagement\Controller:viewHrDepartmentList',
'verb' => RouteVerb::GET,
'permission' => [
'module' => Controller::MODULE_NAME,
'type' => PermissionType::READ,
'state' => PermissionState::DEPARTMENT,
],
],
],
];

View File

@ -0,0 +1,31 @@
<?php
/**
* Orange Management
*
* PHP Version 7.2
*
* @package Modules\HumanResourceManagement
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link http://website.orange-management.de
*/
declare(strict_types=1);
namespace Modules\HumanResourceManagement\Models;
use phpOMS\Stdlib\Base\Enum;
/**
* Permision state enum.
*
* @package Modules\HumanResourceManagement
* @license OMS License 1.0
* @link http://website.orange-management.de
* @since 1.0.0
*/
abstract class PermissionState extends Enum
{
public const HR = 1;
public const DEPARTMENT = 2;
}