File "AuthAdmin.php"

Full Path: /home/u886502366/domains/almoasronppbags.com/public_html/newtest/wp-content/plugins/depicter/vendor/typerocket/core/src/Http/Middleware/AuthAdmin.php
File size: 450 bytes
MIME-type: text/x-php
Charset: utf-8

<?php
namespace TypeRocket\Http\Middleware;

use TypeRocket\Exceptions\HttpError;

/**
 * Class AuthAdmin
 *
 * Authenticate user as administrator and if the user is not
 * invalidate the response.
 *
 * @package TypeRocket\Http\Middleware
 */
class AuthAdmin extends Middleware
{
    public function handle() {

        if ( ! current_user_can('administrator') ) {
            HttpError::abort(401);
        }

        $this->next->handle();
    }
}