ability to download log from admin

This commit is contained in:
Čarodej
2022-03-08 10:51:32 +01:00
parent 4e2155b75a
commit dd1f3b299d
52 changed files with 182 additions and 46 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace Support\Middleware;
use Closure;
class AdminCheck
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
// Check if user have access to administration settings
if ( $request->user()->role !== 'admin') {
abort(403, 'You don\'t have access for this operation!');
}
return $next($request);
}
}