<?php

namespace Modules\Parametrage\Rules;

use Helpers\Outil\Roles;
use Modules\Fournisseur\Rules\Main;
use Psr\Http\Message\ServerRequestInterface;

class ParametrageAPI
{
    /** @var ServerRequestInterface $request */
    protected ServerRequestInterface $request;

    /** @var \PDO $pdo */
    protected \PDO $pdo;

    public function __construct(ServerRequestInterface  $request, \PDO $pdo)
    {
        $this->request              = $request;
        $this->pdo                  = $pdo;
    }

    public function index(): bool
    {
        if (! Roles::droitsUtilisateur($this->pdo, 'HA_PARAM')) {
            return false;
        }
        return true;
    }
}
