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 38108a01d7
commit 50adef4885
3 changed files with 12 additions and 12 deletions

View File

@ -13,9 +13,9 @@
declare(strict_types=1); declare(strict_types=1);
use Modules\Admin\Controller\ApiController as AdminApiController; use Modules\Admin\Controller\ApiController as AdminApiController;
use Modules\Admin\Models\PermissionState as AdminPermissionState; use Modules\Admin\Models\PermissionCategory as AdminPermissionCategory;
use Modules\Profile\Controller\ApiController; use Modules\Profile\Controller\ApiController;
use Modules\Profile\Models\PermissionState; use Modules\Profile\Models\PermissionCategory;
use phpOMS\Account\PermissionType; use phpOMS\Account\PermissionType;
use phpOMS\Router\RouteVerb; use phpOMS\Router\RouteVerb;
@ -27,7 +27,7 @@ return [
'permission' => [ 'permission' => [
'module' => ApiController::NAME, 'module' => ApiController::NAME,
'type' => PermissionType::CREATE, 'type' => PermissionType::CREATE,
'state' => PermissionState::PROFILE, 'state' => PermissionCategory::PROFILE,
], ],
], ],
], ],
@ -39,7 +39,7 @@ return [
'permission' => [ 'permission' => [
'module' => AdminApiController::NAME, 'module' => AdminApiController::NAME,
'type' => PermissionType::MODIFY, 'type' => PermissionType::MODIFY,
'state' => AdminPermissionState::ACCOUNT_SETTINGS, 'state' => AdminPermissionCategory::ACCOUNT_SETTINGS,
], ],
], ],
], ],
@ -50,7 +50,7 @@ return [
'permission' => [ 'permission' => [
'module' => ApiController::NAME, 'module' => ApiController::NAME,
'type' => PermissionType::MODIFY, 'type' => PermissionType::MODIFY,
'state' => PermissionState::PROFILE, 'state' => PermissionCategory::PROFILE,
], ],
], ],
], ],

View File

@ -13,7 +13,7 @@
declare(strict_types=1); declare(strict_types=1);
use Modules\Profile\Controller\BackendController; use Modules\Profile\Controller\BackendController;
use Modules\Profile\Models\PermissionState; use Modules\Profile\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::PROFILE, 'state' => PermissionCategory::PROFILE,
], ],
], ],
], ],
@ -36,7 +36,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::PROFILE, 'state' => PermissionCategory::PROFILE,
], ],
], ],
], ],
@ -47,7 +47,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::PROFILE, 'state' => PermissionCategory::PROFILE,
], ],
], ],
], ],
@ -58,7 +58,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::PROFILE, 'state' => PermissionCategory::PROFILE,
], ],
], ],
], ],
@ -69,7 +69,7 @@ return [
'permission' => [ 'permission' => [
'module' => BackendController::NAME, 'module' => BackendController::NAME,
'type' => PermissionType::READ, 'type' => PermissionType::READ,
'state' => PermissionState::PROFILE, 'state' => PermissionCategory::PROFILE,
], ],
], ],
], ],

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 PROFILE = 1; public const PROFILE = 1;