File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -2677,7 +2677,6 @@ permission in :ref:`your custom security voters <creating-the-custom-voter>`::
2677
2677
// src/SalesReport/SalesReportManager.php
2678
2678
2679
2679
// ...
2680
- use Symfony\Component\Security\Core\Exception\AccessDeniedException;
2681
2680
use Symfony\Bundle\SecurityBundle\Security;
2682
2681
2683
2682
class SalesReportManager
@@ -2690,7 +2689,7 @@ permission in :ref:`your custom security voters <creating-the-custom-voter>`::
2690
2689
public function generateReport(): void
2691
2690
{
2692
2691
$voterDecision = $this->security->getAccessDecision('ROLE_SALES_ADMIN');
2693
- if ($voterDecisionisGranted ('ROLE_SALES_ADMIN')) {
2692
+ if ($voterDecision->isGranted ('ROLE_SALES_ADMIN')) {
2694
2693
// ...
2695
2694
} else {
2696
2695
// do something with $voterDecision->getMessage()
You can’t perform that action at this time.
0 commit comments