changed badly named permission type to permission category because type should only be read/write/...

This commit is contained in:
Dennis Eichhorn 2022-03-17 23:01:30 +01:00
parent ab443fca3c
commit 9ba73749db
2 changed files with 21 additions and 21 deletions

View File

@ -13,7 +13,7 @@
declare(strict_types=1); declare(strict_types=1);
use Modules\RiskManagement\Controller\BackendController; use Modules\RiskManagement\Controller\BackendController;
use Modules\RiskManagement\Models\PermissionState; use Modules\RiskManagement\Models\PermissionCategory;
use phpOMS\Account\PermissionType; use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb; use phpOMS\Router\RouteVerb;
@ -25,7 +25,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::COCKPIT, 'state' => PermissionCategory::COCKPIT,
], ],
], ],
], ],
@ -36,7 +36,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::RISK, 'state' => PermissionCategory::RISK,
], ],
], ],
], ],
@ -47,7 +47,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::CREATE, 'type' => PermissionType::CREATE,
'state' => PermissionState::RISK, 'state' => PermissionCategory::RISK,
], ],
], ],
], ],
@ -58,7 +58,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::RISK, 'state' => PermissionCategory::RISK,
], ],
], ],
], ],
@ -69,7 +69,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::CAUSE, 'state' => PermissionCategory::CAUSE,
], ],
], ],
], ],
@ -80,7 +80,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::CAUSE, 'state' => PermissionCategory::CAUSE,
], ],
], ],
], ],
@ -91,7 +91,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::SOLUTION, 'state' => PermissionCategory::SOLUTION,
], ],
], ],
], ],
@ -102,7 +102,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::SOLUTION, 'state' => PermissionCategory::SOLUTION,
], ],
], ],
], ],
@ -113,7 +113,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::UNIT, 'state' => PermissionCategory::UNIT,
], ],
], ],
], ],
@ -124,7 +124,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::UNIT, 'state' => PermissionCategory::UNIT,
], ],
], ],
], ],
@ -135,7 +135,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::DEPARTMENT, 'state' => PermissionCategory::DEPARTMENT,
], ],
], ],
], ],
@ -146,7 +146,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::DEPARTMENT, 'state' => PermissionCategory::DEPARTMENT,
], ],
], ],
], ],
@ -157,7 +157,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::CATEGORY, 'state' => PermissionCategory::CATEGORY,
], ],
], ],
], ],
@ -168,7 +168,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::CATEGORY, 'state' => PermissionCategory::CATEGORY,
], ],
], ],
], ],
@ -179,7 +179,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::PROJECT, 'state' => PermissionCategory::PROJECT,
], ],
], ],
], ],
@ -190,7 +190,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::PROJECT, 'state' => PermissionCategory::PROJECT,
], ],
], ],
], ],
@ -201,7 +201,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::PROCESS, 'state' => PermissionCategory::PROCESS,
], ],
], ],
], ],
@ -212,7 +212,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::PROCESS, 'state' => PermissionCategory::PROCESS,
], ],
], ],
], ],
@ -223,7 +223,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::SETTINGS, 'state' => PermissionCategory::SETTINGS,
], ],
], ],
], ],

View File

@ -24,7 +24,7 @@ use phpOMS\Stdlib\Base\Enum;
* @link https://karaka.app * @link https://karaka.app
* @since 1.0.0 * @since 1.0.0
*/ */
abstract class PermissionState extends Enum abstract class PermissionCategory extends Enum
{ {
public const COCKPIT = 1; public const COCKPIT = 1;