Skip to content

Commit 0d32dd9

Browse files
committed
Fixes
1 parent 5034d44 commit 0d32dd9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

security.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2677,7 +2677,6 @@ permission in :ref:`your custom security voters <creating-the-custom-voter>`::
26772677
// src/SalesReport/SalesReportManager.php
26782678

26792679
// ...
2680-
use Symfony\Component\Security\Core\Exception\AccessDeniedException;
26812680
use Symfony\Bundle\SecurityBundle\Security;
26822681

26832682
class SalesReportManager
@@ -2690,7 +2689,7 @@ permission in :ref:`your custom security voters <creating-the-custom-voter>`::
26902689
public function generateReport(): void
26912690
{
26922691
$voterDecision = $this->security->getAccessDecision('ROLE_SALES_ADMIN');
2693-
if ($voterDecisionisGranted('ROLE_SALES_ADMIN')) {
2692+
if ($voterDecision->isGranted('ROLE_SALES_ADMIN')) {
26942693
// ...
26952694
} else {
26962695
// do something with $voterDecision->getMessage()

0 commit comments

Comments
 (0)