<?php
namespace Modules\Additional\Specifique\Client155\Modules\Fournisseur\Rules;

use Helpers\Outil\Roles;
use Psr\Http\Message\ServerRequestInterface;

// @phpcs:ignore
class ImportReporting
{
    /** @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;
    }


    /**
     * @return bool
     */
    public function import(): bool
    {
        // Droit fourniss admin SYSU
        if (! Roles::droitsUtilisateur($this->pdo, 'SpeSYSU001')) {
            return false;
        }
        return true;
    }
}
