mirror of
https://github.com/kevinveenbirkenbach/infinito.git
synced 2025-09-13 13:57:10 +02:00
Renamed SecureRequestedRightChecker and implemented integration tests for it
This commit is contained in:
@@ -4,6 +4,9 @@ namespace App\Domain\ActionManagement;
|
||||
|
||||
use App\Entity\EntityInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface ActionInterface
|
||||
{
|
||||
/**
|
||||
|
@@ -11,7 +11,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use App\Domain\FormManagement\RequestedActionFormBuilderServiceInterface;
|
||||
use App\Domain\RequestManagement\Action\RequestedActionServiceInterface;
|
||||
use App\Domain\SecureManagement\SecureRequestedRightCheckerInterface;
|
||||
use App\Domain\SecureManagement\SecureRequestedRightCheckerServiceInterface;
|
||||
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
@@ -29,9 +29,9 @@ final class ActionService implements ActionServiceInterface
|
||||
private $requestedAction;
|
||||
|
||||
/**
|
||||
* @var SecureRequestedRightCheckerInterface
|
||||
* @var SecureRequestedRightCheckerServiceInterface
|
||||
*/
|
||||
private $secureRequestedRightChecker;
|
||||
private $secureRequestedRightCheckerService;
|
||||
|
||||
/**
|
||||
* @var LayerRepositoryFactoryServiceInterface
|
||||
@@ -51,10 +51,10 @@ final class ActionService implements ActionServiceInterface
|
||||
/**
|
||||
* @param RequestedActionInterface $requestedActionService
|
||||
*/
|
||||
public function __construct(RequestedActionServiceInterface $requestedActionService, SecureRequestedRightCheckerInterface $secureRequestedRightChecker, RequestStack $requestStack, LayerRepositoryFactoryServiceInterface $layerRepositoryFactoryService, RequestedActionFormBuilderServiceInterface $requestedActionFormBuilderService, EntityManagerInterface $entityManager)
|
||||
public function __construct(RequestedActionServiceInterface $requestedActionService, SecureRequestedRightCheckerServiceInterface $secureRequestedRightChecker, RequestStack $requestStack, LayerRepositoryFactoryServiceInterface $layerRepositoryFactoryService, RequestedActionFormBuilderServiceInterface $requestedActionFormBuilderService, EntityManagerInterface $entityManager)
|
||||
{
|
||||
$this->requestedAction = $requestedActionService;
|
||||
$this->secureRequestedRightChecker = $secureRequestedRightChecker;
|
||||
$this->secureRequestedRightCheckerService = $secureRequestedRightChecker;
|
||||
$this->requestStack = $requestStack;
|
||||
$this->layerRepositoryFactoryService = $layerRepositoryFactoryService;
|
||||
$this->requestedActionFormBuilderService = $requestedActionFormBuilderService;
|
||||
@@ -78,7 +78,7 @@ final class ActionService implements ActionServiceInterface
|
||||
*/
|
||||
public function isRequestedActionSecure(): bool
|
||||
{
|
||||
return $this->secureRequestedRightChecker->check($this->requestedAction);
|
||||
return $this->secureRequestedRightCheckerService->check($this->requestedAction);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -9,7 +9,7 @@ use App\Domain\RightManagement\RightTransformerServiceInterface;
|
||||
/**
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
final class SecureRequestedRightChecker implements SecureRequestedRightCheckerInterface
|
||||
final class SecureRequestedRightCheckerService implements SecureRequestedRightCheckerServiceInterface
|
||||
{
|
||||
/**
|
||||
* @var RightTransformerServiceInterface
|
||||
@@ -27,7 +27,7 @@ final class SecureRequestedRightChecker implements SecureRequestedRightCheckerIn
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* @see \App\Domain\SecureManagement\SecureRequestedRightCheckerInterface::check()
|
||||
* @see \App\Domain\SecureManagement\SecureRequestedRightCheckerServiceInterface::check()
|
||||
*/
|
||||
public function check(RequestedRightInterface $requestedRight): bool
|
||||
{
|
@@ -9,7 +9,7 @@ use App\Domain\RequestManagement\Right\RequestedRightInterface;
|
||||
*
|
||||
* @author kevinfrantz
|
||||
*/
|
||||
interface SecureRequestedRightCheckerInterface
|
||||
interface SecureRequestedRightCheckerServiceInterface
|
||||
{
|
||||
/**
|
||||
* @param RequestedRightInterface $requestedRight
|
Reference in New Issue
Block a user