This repository was archived by the owner on Jul 3, 2020. It is now read-only.
v2.5.0
- [NEW FEATURE] Previously, the RoutePermissionsGuard accepted a route only if the current identity had ALL the permissions:
'guards' => [
'ZfcRbac\Guard\RoutePermissionsGuard' => [
'post/manage' => ['post.update', 'post.delete']
]
]This route is accepted only if the identity has both post.update and post.delete permissions. ZfcRbac now accepts an additional option:
'guards' => [
'ZfcRbac\Guard\RoutePermissionsGuard' => [
'post/manage' => [
'permissions' => ['post.update', 'post.delete'],
'condition' => GuardInterface::CONDITION_OR
]
]
]Now, the route is accepted if the identity has post.update permission only, post.delete permission only, or both.
Thanks to @davidwindell for this feature!