Implement dark mode, bug report page, and schema dump

This commit is contained in:
2025-11-27 15:06:45 +08:00
parent 13bc6db529
commit 83602b1ed1
91 changed files with 1078 additions and 2291 deletions

View File

@@ -12,7 +12,12 @@ class EnsureUserIsAdmin
{
$user = $request->user();
if (! $user || (! $user->is_admin && ! $user->hasRole('admin'))) {
if (! $user) {
abort(403);
}
// Allow access for admins or any user with explicit permissions (e.g. finance/cashier roles)
if (! $user->is_admin && ! $user->hasRole('admin') && $user->getAllPermissions()->isEmpty()) {
abort(403);
}