Skip to content
This repository was archived by the owner on Jul 3, 2020. It is now read-only.

v2.5.0

Choose a tag to compare

@bakura10 bakura10 released this 31 Mar 08:55
· 91 commits to master since this release
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!