Add support for "forbidden" response with missing permissions in Nginx response handler

This commit is contained in:
Jeppe Bundgaard
2026-03-19 14:39:23 +01:00
parent 60f6cbee84
commit 3752fdec4c
2 changed files with 9 additions and 0 deletions
+8
View File
@@ -101,6 +101,14 @@ class response implements response_i
$this->error('Internal server error' . ($error ? ': ' . $error : ''), 500);
}
#[NoReturn] public function forbidden(array $permissions): void
{
$this->error([
'message' => 'Missing permission(s)',
'permissions' => $permissions
], 403);
}
public function paginate(int $page, int $per_page, int $total, string $search = null, array $filters = null, array $order = null): void
{
// If the total is 0, return 1 page, 0 total