<?php
namespace App\PackagesAdmin\Manager\Exceptions;

use Symfony\Component\HttpKernel\Exception\HttpException;

class UnauthorizedException extends HttpException
{

    public static function forPermissions(): self
    {
        $message = 'User does not have the right permissions.';

        $exception = new static(403, $message, null, []);
        return $exception;
    }
}