<?php
namespace Claromentis\People\UseCase;

$GLOBALS["__65da1b1ec2d6653" . "e8a0ab7848e536215"] = (@$GLOBALS["__65da1b1e" . "c2d6653e8a" . "0ab7848e53" . "6215"] ?: array()) + array("_b0849e1" . "170c359d" . "5001e4e5" . "9414c9d8" . "b" => base64_decode("WW91IGRvIG5vdCBoYXZlIHBlcm1pc3N" . "pb24gdG8gdmlldyB0aGUgcHJpbWFyeS" . "BleHRyYW5ldA=="));
use Claromentis\Core\Security\SecurityContext;
use Claromentis\People\Entity\Extranet;
use Claromentis\People\Exception\PermissionException;
use Claromentis\People\PeopleAcl;
use Claromentis\People\Repository\ExtranetRepository;
class GetPrimaryExtranet
{
    
    
    
    
    protected $acl;
    
    
    
    
    protected $repository;
    public function __construct(PeopleAcl $acl, ExtranetRepository $_8652ba33e6ffeba02459fa9cbb320851)
    {
        $this->acl = $acl;
        $this->repository = $_8652ba33e6ffeba02459fa9cbb320851;
    }
    
    
    
    
    
    
    public function GetPrimaryExtranet(SecurityContext $context) : Extranet
    {
        $_9a2ef4ae6a5745ffe5fac33c88a222fa = $this->repository->getPrimaryExtranet();
        if (!$this->acl->CanViewExtranet($context, $_9a2ef4ae6a5745ffe5fac33c88a222fa)) {
            throw new PermissionException($GLOBALS["__65da1b1ec2d6653e" . "8a0ab7848e536215"]["_b0849e11" . "70c359d50" . "01e4e5941" . "4c9d8b"]);
        }
        return $_9a2ef4ae6a5745ffe5fac33c88a222fa;
    }
}