Optimized draft for UserSourceDirector and UserRight

This commit is contained in:
Kevin Frantz
2019-01-13 14:00:16 +01:00
parent 1dc428bcfd
commit 2837df25f8
12 changed files with 108 additions and 100 deletions

View File

@@ -6,7 +6,6 @@ use Symfony\Component\HttpFoundation\Response;
use App\Entity\UserInterface;
use Doctrine\ORM\EntityManagerInterface;
use App\Entity\Meta\RightInterface;
use App\Domain\UserManagement\UserIdentityManager;
use Symfony\Component\Security\Core\User\UserInterface as CoreUserInterface;
use FOS\RestBundle\View\ViewHandlerInterface;
use App\Entity\Source\SourceInterface;
@@ -35,13 +34,13 @@ final class SourceRESTResponseManagerService implements SourceRESTResponseManage
* @var SourceInterface
*/
private $loadedSource;
/**
* @var UserInterface
*/
private $user;
public function __construct(CoreUserInterface $user,SecureSourceReadService $secureSourceRead, EntityManagerInterface $entityManager, RightInterface $requestedRight)
public function __construct(CoreUserInterface $user, SecureSourceReadService $secureSourceRead, EntityManagerInterface $entityManager, RightInterface $requestedRight)
{
$this->entityManager = $entityManager;
$this->user = $user;
@@ -72,7 +71,8 @@ final class SourceRESTResponseManagerService implements SourceRESTResponseManage
}
/**
* {@inheritDoc}
* {@inheritdoc}
*
* @see \App\Domain\ResponseManagement\SourceRESTResponseManagerServiceInterface::getResponse()
*/
public function getResponse(ViewHandlerInterface $viewHandler): Response