has_roles should be is_granted in security upgrade file

This commit is contained in:
Lynn 2019-11-25 15:08:41 +01:00
parent 395558cede
commit 2f1336e79f

View File

@ -15,7 +15,7 @@ CHANGELOG
**After**
```php
if ($this->authorizationChecker->isGranted(new Expression("has_role('ROLE_USER') or has_role('ROLE_ADMIN')"))) {}
if ($this->authorizationChecker->isGranted(new Expression("is_granted('ROLE_USER') or is_granted('ROLE_ADMIN')"))) {}
// or:
if ($this->authorizationChecker->isGranted('ROLE_USER')
|| $this->authorizationChecker->isGranted('ROLE_ADMIN')