* @copyright Since 2007 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) */ namespace PrestaShop\PrestaShop\Core\Import\Access; use PrestaShop\PrestaShop\Core\Employee\ContextEmployeeProviderInterface; /** * Class ImportAccessChecker is responsible for checking import access. */ final class ImportAccessChecker implements ImportAccessCheckerInterface { /** * @var ContextEmployeeProviderInterface */ private $contextEmployeeProvider; /** * @param ContextEmployeeProviderInterface $contextEmployeeProvider */ public function __construct(ContextEmployeeProviderInterface $contextEmployeeProvider) { $this->contextEmployeeProvider = $contextEmployeeProvider; } /** * {@inheritdoc} */ public function canTruncateData() { return $this->contextEmployeeProvider->isSuperAdmin(); } }