Server : LiteSpeed
System : Linux quebec.us.hostns.io 5.14.0-687.42.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 27 11:55:12 EDT 2026 x86_64
User : gazetufm ( 1431)
PHP Version : 8.1.35
Disable Function : NONE
Directory :  /home2/gazetufm/leonora.al/wp-content/plugins/kirki/app/Http/Middlewares/

📁 Create New:
⬆️ Upload File:
Current Dir [ Writable ] Root [ Writable ]


OR Upload from URL:
URL: Save as:

📄 File: AdminAccessMiddleware.php

Path: //home2/gazetufm/leonora.al/wp-content/plugins/kirki/app/Http/Middlewares/AdminAccessMiddleware.php

Size: 888 B

Permissions: 0644

<?php

namespace Kirki\App\Http\Middlewares;

defined('ABSPATH') || exit;

use Kirki\Framework\Contracts\Middleware;
use Kirki\Framework\Contracts\Request;
use Kirki\Framework\Exceptions\AuthorizationException;
use function Kirki\Framework\user;

class AdminAccessMiddleware implements Middleware
{
    /**
     * Handle the incoming request and determine if the user is an administrator.
     *
     * @param Request $request The incoming request instance.
     * @param callable $next The next middleware or controller to execute.
     * @return mixed The result of the next middleware or a response.
     */
    public function handle(Request $request, callable $next)
    {
        if (!user()->is_administrator()) {
            throw new AuthorizationException(__('You don\'t have the permission to access this request', 'kirki'));
        }

        return $next($request);
    }
}

← Back to Directory Edit File 🔒 Chmod

WP File Manager