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

Releases: ZF-Commons/zfc-rbac

v2.5.1

16 Apr 12:45
v2.5.1
Compare
Choose a tag to compare
  • Fix a bug to properly load all permissions for ZendDeveloperTools when using Hierarchical Roles.

v2.5.0

31 Mar 08:55
v2.5.0
Compare
Choose a tag to compare
  • [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!

v2.4.2

26 Jan 11:43
2.4.2
Compare
Choose a tag to compare
  • Various doc fixes
  • RoleNotFoundException and UnauthorizedException now have default error message

v2.4.1

01 Dec 17:10
Compare
Choose a tag to compare
  • Various doc updates
  • RedirectStrategy view strategy now type hint against Zend\Authentication\AuthenticationServiceInterface instead of concrete implementation.

v2.4.0

23 Jun 08:13
2.4.0
Compare
Choose a tag to compare
  • Add a new hasRole view helper. This is useful for showing a navigation, for instance.
  • Add a delegator to inject AuthorizationService into your objects. This is more efficient than initializers, but require more configuration. #249 (see docs)
  • Add two new guards: RoutePermissionsGuard and ControllerPermissionsGuard. They work similarly as other guards but act on permissions rather on roles. #243 (see docs)

v2.3.1

01 Jun 16:26
2.3.1
Compare
Choose a tag to compare
  • Throw an exception when no role provider is set, for easier debugging

v2.3.0

04 May 16:49
2.3.0
Compare
Choose a tag to compare
  • When using the RedirectStrategy, user was always redirected when he/she tried to access an unauthorized page. In some cases, you actually want to show them the 403 page. You can now do this through the new redirect_when_connected option in the RedirectStrategy.
  • Various doc fixes

v2.2.0

04 Apr 21:03
2.2.0
Compare
Choose a tag to compare
  • New AuthorizationServiceInterface has been introduced to simplify writing tests.
  • [Minor BC] A minor BC has been introduced if you explicitly created sub-classes of IsGranted view helper and/or controller plugin. Please read the UPGRADE document if that's the case.

0.2.3

18 Mar 17:39
Compare
Choose a tag to compare
  • Maintenance release for 0.2.x branch (please use v2.x for a new project!)

v2.1.2

14 Mar 17:00
2.1.2
Compare
Choose a tag to compare
  • AuthorizationServiceInitializer now works when used in context of plugin managers.