bug fix in bank transfer access control check

This commit is contained in:
Hesabix 2025-01-11 15:58:18 +00:00
parent 282037cf73
commit dcef28d88e
2 changed files with 1 additions and 15 deletions

View file

@ -19,7 +19,7 @@ class TransferController extends AbstractController
#[Route('/api/transfer/search', name: 'app_transfer_search')]
public function app_transfer_search(Provider $provider,Request $request,Access $access,Log $log,EntityManagerInterface $entityManager): JsonResponse
{
$acc = $access->hasRole('transfer');
$acc = $access->hasRole('bankTransfer');
if(!$acc)
throw $this->createAccessDeniedException();
$items = $entityManager->getRepository(HesabdariDoc::class)->findBy([

View file

@ -120,9 +120,6 @@ class Permission
#[ORM\Column(nullable: true)]
private ?bool $plugRepservice = null;
#[ORM\Column(nullable: true)]
private ?bool $Transfer = null;
public function getId(): ?int
{
return $this->id;
@ -548,15 +545,4 @@ class Permission
return $this;
}
public function isTransfer(): ?bool
{
return $this->Transfer;
}
public function setTransfer(?bool $Transfer): static
{
$this->Transfer = $Transfer;
return $this;
}
}