Skip to content

Commit 3cb33c9

Browse files
authored
Update fields-public-control.md
In Symfony 6+ `security.authorization-checker` is not a public service anymore, hence the previous example won't work. However the expression language supports using `isGranted` directly hence I propose to update the documentation.
1 parent a223567 commit 3cb33c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/security/fields-public-control.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ AnObject:
1717
type: "String!"
1818
privateData:
1919
type: "String"
20-
public: "@=service('security.authorization_checker').isGranted('ROLE_ADMIN')"
20+
public: "@=isGranted('ROLE_ADMIN')"
2121
```
2222
2323
## With Annotations

0 commit comments

Comments
 (0)