big restructure

This commit is contained in:
2026-02-11 19:28:12 +01:00
parent cd59ccd99b
commit 3eb9cc0ac4
209 changed files with 5101 additions and 2459 deletions

View File

@@ -2,7 +2,7 @@
use MintyPHP\Router;
use MintyPHP\Support\Guard;
use MintyPHP\Service\PermissionService;
use MintyPHP\Service\Access\PermissionService;
Guard::requireLogin();
Guard::requirePermission(PermissionService::PERMISSIONS_VIEW);
@@ -16,6 +16,7 @@ $offset = (int) ($_GET['offset'] ?? 0);
$search = trim((string) ($_GET['search'] ?? ''));
$order = (string) ($_GET['order'] ?? 'key');
$dir = (string) ($_GET['dir'] ?? 'asc');
$active = (string) ($_GET['active'] ?? '');
$result = PermissionService::listPaged([
'limit' => $limit,
@@ -23,6 +24,7 @@ $result = PermissionService::listPaged([
'search' => $search,
'order' => $order,
'dir' => $dir,
'active' => $active,
]);
$rows = [];
@@ -31,6 +33,8 @@ foreach ($result['data'] ?? [] as $row) {
'id' => $row['id'] ?? null,
'key' => $row['key'] ?? '',
'description' => $row['description'] ?? '',
'active' => (int) ($row['active'] ?? 1),
'is_system' => (int) ($row['is_system'] ?? 0),
'created' => dt($row['created'] ?? ''),
];
}