8000 has_roles should be is_granted in security upgrade file · symfony/symfony@2f1336e · GitHub
[go: up one dir, main page]

Skip to content

Commit 2f1336e

Browse files
committed
has_roles should be is_granted in security upgrade file
1 parent 395558c commit 2f1336e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Security/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ CHANGELOG
1515

1616
**After**
1717
```php
18-
if ($this->authorizationChecker->isGranted(new Expression("has_role('ROLE_USER') or has_role('ROLE_ADMIN')"))) {}
18+
if ($this->authorizationChecker->isGranted(new Expression("is_granted('ROLE_USER') or is_granted('ROLE_ADMIN')"))) {}
1919
// or:
2020
if ($this->authorizationChecker->isGranted('ROLE_USER')
2121
|| $this->authorizationChecker->isGranted('ROLE_ADMIN')

0 commit comments

Comments
 (0)
0