commit 08-2025
This commit is contained in:
parent
9ae662f63e
commit
480fdc65ed
404 changed files with 65310 additions and 2600431 deletions
|
|
@ -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.');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue