Commit 7e9f36e
authored
Fix isAnonymous() always returning false on Symfony 6.x (#1240)
* Fix isAnonymous() always returning false on Symfony 6.x
IS_AUTHENTICATED_ANONYMOUSLY was removed from AuthenticatedVoter in
Symfony 6.x (deprecated since 5.4). When using #[GQL\Access('isAnonymous()')]
on a Provider field, the access check always returned false, causing every
request to get "Access denied to this field" regardless of auth state.
PUBLIC_ACCESS is the correct replacement since Symfony 5.4 and has the
same semantics: it always grants access.
* Update IsAnonymousTest for Symfony 6.x PUBLIC_ACCESS change1 parent 76d9709 commit 7e9f36e
2 files changed
Lines changed: 3 additions & 6 deletions
File tree
- src/Security
- tests/ExpressionLanguage/ExpressionFunction/Security
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| |||
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 20 | + | |
24 | 21 | | |
25 | 22 | | |
26 | 23 | | |
| |||
29 | 26 | | |
30 | 27 | | |
31 | 28 | | |
32 | | - | |
| 29 | + | |
33 | 30 | | |
34 | 31 | | |
0 commit comments