commit 08-2025

This commit is contained in:
Kevin Adametz 2025-08-12 18:01:59 +02:00
parent 9ae662f63e
commit 480fdc65ed
404 changed files with 65310 additions and 2600431 deletions

View file

@ -16,11 +16,17 @@ class SuperAdmin
*/
public function handle($request, Closure $next)
{
if ( Auth::check() && Auth::user()->isSuperAdmin() )
{
if (!Auth::check()) {
return redirect('/home');
}
$user = Auth::user();
// Nur SuperAdmins (admin >= 3) durchlassen
if ($user->admin >= 3) {
return $next($request);
}
return redirect('/home');
abort(403, 'Sie benötigen SuperAdmin-Rechte für diesen Bereich.');
}
}