PATH:
home
/
lab2454c
/
costbloc.com
/
app
/
Http
/
Middleware
<?php /** * @package Permission middleware * @author TechVillage <support@techvill.org> * @contributor Millat <[millat.techvill@gmail.com]> * @created 28-08-2021 */ namespace App\Http\Middleware; use Closure; use Illuminate\Support\Facades\Auth; use Route; class Permission { public function handle($request, Closure $next) { if (session('impersonator') && $request->segment(2) <> 'impersonate' && $request->segment(1) == 'admin') { Auth::onceUsingId(session('impersonator')); } if (!hasPermission()) { abort(403, __('Unauthorized! Go home, grow up and get authorization')); } return $next($request); } }
[-] TrustProxies.php
[edit]
[-] CheckForMaintenanceMode.php
[edit]
[-] IsLoggedIn.php
[edit]
[-] TrimStrings.php
[edit]
[+]
..
[-] Permission.php
[edit]
[+]
Api
[-] RedirectIfNotCustomer.php
[edit]
[-] RedirectIfAuthenticated.php
[edit]
[-] Authenticate.php
[edit]
[-] CheckGuest.php
[edit]
[-] UserAuthenticate.php
[edit]
[-] EncryptCookies.php
[edit]
[-] PreventRequestsDuringMaintenance.php
[edit]
[-] Locale.php
[edit]
[-] CheckForDemoMode.php
[edit]
[-] VerifyCsrfToken.php
[edit]
[-] TrustHosts.php
[edit]