Export and Import vito settings (#606)

* Export and Import vito settings

* fix tests
This commit is contained in:
Saeed Vaziry
2025-06-05 17:01:22 +02:00
committed by GitHub
parent 8e8859b305
commit 4e6491a080
11 changed files with 314 additions and 3 deletions

View File

@ -0,0 +1,18 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
class MustBeAdminMiddleware
{
public function handle(Request $request, Closure $next): mixed
{
if (! user()->isAdmin()) {
abort(403, 'You must be an admin to perform this action.');
}
return $next($request);
}
}