Implement route-level permission handling.

Added support for defining and registering permissions for API routes. Updated methods across the router and route traits to accommodate permission details, enabling better access control. Enhanced department license plate lookup with session validation and additional endpoints.
This commit is contained in:
Jepp9350
2025-02-20 14:12:21 +01:00
parent b659b07d4c
commit d9638406d3
4 changed files with 116 additions and 22 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ class workerRoute
$this->get('/worker/status', function () {
global /** @var router $router */
$response, $router;
$response->success(['message' => 'Worker is running', 'status' => 'OK', 'time' => date('Y-m-d H:i:s'), 'timezone' => date_default_timezone_get(), 'host' => gethostname(), 'version' => '1.0.1', 'routes' => $router->countRoutes()]);
$response->success(['message' => 'Worker is running', 'status' => 'OK', 'time' => date('Y-m-d H:i:s'), 'timezone' => date_default_timezone_get(), 'host' => gethostname(), 'version' => '1.0.1', 'routes' => $router->countRoutes(), 'permissions' => $router->getPermissions()]);
});
}
}