| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 53 | public function handle($request, Closure $next) |
||
| 54 | { |
||
| 55 | if (backpack_auth()->guest()) { |
||
| 56 | return $this->respondToUnauthorizedRequest($request); |
||
| 57 | } |
||
| 58 | |||
| 59 | if (! $this->checkIfUserIsAdmin(backpack_user())) { |
||
| 60 | return $this->respondToUnauthorizedRequest($request); |
||
| 61 | } |
||
| 62 | |||
| 63 | return $next($request); |
||
| 64 | } |
||
| 66 |