mirror of
https://github.com/Karaka-Management/oms-Accounting.git
synced 2026-01-26 11:28:40 +00:00
parent
bb1dbefd6a
commit
42bc138ce0
|
|
@ -1,102 +1,185 @@
|
|||
<?php
|
||||
|
||||
use phpOMS\Router\RouteVerb;
|
||||
use phpOMS\Account\PermissionType;
|
||||
use Modules\Accounting\Models\PermissionState;
|
||||
use Modules\Accounting\Controller;
|
||||
|
||||
return [
|
||||
'^.*/backend/accounting/personal/entries.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewPersonalEntries',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::PERSONAL,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/backend/accounting/impersonal/entries.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewImpersonalEntries',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::IMPERSONAL,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/backend/accounting/entries.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewEntries',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::ENTRY,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/backend/accounting/impersonal/journal/list.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewJournalList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::JOURNAL,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/backend/accounting/stack/list.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewStackList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::STACK,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/backend/accounting/stack/entries.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewStackEntries',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::STACK,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/backend/accounting/stack/archive/list.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewStackArchiveList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::STACK,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/backend/accounting/stack/create.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewStackCreate',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionState::STACK,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/backend/accounting/stack/predefined/list.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewStackPredefinedList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::STACK,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/backend/accounting/gl/list.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewGLList',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::GL,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/backend/accounting/gl/create.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewGLCreate',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::CREATE,
|
||||
'state' => PermissionState::GL,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/backend/accounting/gl/profile.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewGLProfile',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::GL,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/api/accounting/dun/print.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewCostCenterProfile',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::COST_CENTER,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/api/accounting/statement/print.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewCostCenterProfile',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::ACCOUNT,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/api/accounting/balances/print.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewCostCenterProfile',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::ACCOUNT,
|
||||
],
|
||||
],
|
||||
],
|
||||
'^.*/api/accounting/accountform/print.*$' => [
|
||||
[
|
||||
'dest' => '\Modules\Accounting\Controller:viewCostCenterProfile',
|
||||
'verb' => RouteVerb::GET,
|
||||
'permission' => [
|
||||
'module' => Controller::MODULE_NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => PermissionState::ACCOUNT,
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
|
|
|
|||
37
Models/PermissionState.php
Normal file
37
Models/PermissionState.php
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.2
|
||||
*
|
||||
* @package Modules\Accounting
|
||||
* @copyright Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://website.orange-management.de
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\Accounting\Models;
|
||||
|
||||
use phpOMS\Stdlib\Base\Enum;
|
||||
|
||||
/**
|
||||
* Permision state enum.
|
||||
*
|
||||
* @package Modules\Accounting
|
||||
* @license OMS License 1.0
|
||||
* @link http://website.orange-management.de
|
||||
* @since 1.0.0
|
||||
*/
|
||||
abstract class PermissionState extends Enum
|
||||
{
|
||||
public const PERSONAL = 1;
|
||||
public const IMPERSONAL = 2;
|
||||
public const JOURNAL = 3;
|
||||
public const STACK = 4;
|
||||
public const GL = 5;
|
||||
public const COST_CENTER = 6;
|
||||
public const ACCOUNT = 7;
|
||||
public const ENTRY = 8;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user