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 SysAdmin
*/
public function handle($request, Closure $next)
{
if ( Auth::check() && Auth::user()->isSySAdmin() )
{
if (!Auth::check()) {
return redirect('/home');
}
$user = Auth::user();
// Nur SysAdmins (admin >= 4) durchlassen
if ($user->admin >= 4) {
return $next($request);
}
return redirect('/home');
abort(403, 'Sie benötigen SysAdmin-Rechte für diesen Bereich.');
}
}