mirror of
https://github.com/Karaka-Management/oms-Navigation.git
synced 2026-01-11 16:18:42 +00:00
changed badly named permission type to permission category because type should only be read/write/...
This commit is contained in:
parent
ccb4b224f1
commit
4d71e72146
|
|
@ -93,8 +93,8 @@
|
|||
"default": null,
|
||||
"null": true
|
||||
},
|
||||
"nav_permission_type": {
|
||||
"name": "nav_permission_type",
|
||||
"nav_permission_category": {
|
||||
"name": "nav_permission_category",
|
||||
"type": "INT",
|
||||
"default": null,
|
||||
"null": true
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ return [
|
|||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => \Modules\Admin\Models\PermissionState::MODULE,
|
||||
'state' => \Modules\Admin\Models\PermissionCategory::MODULE,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
@ -35,7 +35,7 @@ return [
|
|||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => \Modules\Admin\Models\PermissionState::MODULE,
|
||||
'state' => \Modules\Admin\Models\PermissionCategory::MODULE,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
@ -46,7 +46,7 @@ return [
|
|||
'permission' => [
|
||||
'module' => BackendController::NAME,
|
||||
'type' => PermissionType::READ,
|
||||
'state' => \Modules\Admin\Models\PermissionState::MODULE,
|
||||
'state' => \Modules\Admin\Models\PermissionCategory::MODULE,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
|
|
|||
|
|
@ -154,12 +154,12 @@ class NavElement
|
|||
* Permission type required to show link (null = any).
|
||||
*
|
||||
* Modules have different permission types (e.g. customer).
|
||||
* The available types are defind in the respective module in \Modules\???\Models\PermissionState
|
||||
* The available categories are defind in the respective module in \Modules\???\Models\PermissionCategory
|
||||
*
|
||||
* @var null|int
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public ?int $permissionType = null;
|
||||
public ?int $permissionCategory = null;
|
||||
|
||||
/**
|
||||
* Element these permissions must be valid for (null = any).
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ final class NavElementMapper extends DataMapperFactory
|
|||
'nav_order' => ['name' => 'nav_order', 'type' => 'int', 'internal' => 'order'],
|
||||
'nav_parent' => ['name' => 'nav_parent', 'type' => 'int', 'internal' => 'parent'],
|
||||
'nav_permission_permission' => ['name' => 'nav_permission_permission', 'type' => 'int', 'internal' => 'permissionPerm'],
|
||||
'nav_permission_type' => ['name' => 'nav_permission_type', 'type' => 'int', 'internal' => 'permissionType'],
|
||||
'nav_permission_category' => ['name' => 'nav_permission_category', 'type' => 'int', 'internal' => 'permissionCategory'],
|
||||
'nav_permission_element' => ['name' => 'nav_permission_element', 'type' => 'int', 'internal' => 'permissionElement'],
|
||||
'nav_status' => ['name' => 'nav_status', 'type' => 'int', 'internal' => 'status'],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class Navigation
|
|||
$unit,
|
||||
$app,
|
||||
(string) $link[0]['nav_from'],
|
||||
(int) $link[0]['nav_permission_type'],
|
||||
(int) $link[0]['nav_permission_category'],
|
||||
(int) $link[0]['nav_permission_element']
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user