protected function authorize(string $permission, array $context = []): bool
    {
        if (!$this->allows($permission, $context)) {
            $name = $this->resolvePermission($permission);

            throw new ControllerException(
                "Unauthorized permission '{$name}'",
                ControllerException::FORBIDDEN
            );
        }

        return true;
    }