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

zend-permissions-rbac 3.0.0

Compare
Choose a tag to compare
@ezimuel ezimuel released this 22 Mar 13:29
· 22 commits to master since this release

Added

  • #34 adds checks for circular references in the role hierarchy when using the Role::addChild() and Role::addParent() methods.

  • #35 adds the method Role::getPermissions(bool $children = true) for retrieving all permissions to the related role, including all child permissions when $children is boolean true.

  • #35 adds the method Rbac::getRoles(), which returns all roles registered with the instance as a flat array of instances.

Changed

  • #34 updates the Role::addChild(RoleInterface $child) method to accept only a RoleInterface parameter; strings are no longer accepted.

  • #34 updates the Zend\Permissions\Rbac\AssertionInterface, adding two parameters to the assert() definition and defining a return type, so that it now reads as follows:

    public function assert(
        Rbac $rbac,
        RoleInterface $role,
        string $permission
    ) : bool

Deprecated

  • Nothing.

Removed

  • #34 removes support for PHP versions prior to 7.1.

  • #34 removes the AbstractIterator
    class. The role hierarchy no longer relies on a RecursiveIterator.

  • #34 removes the AbstractRole
    class. All its functions have been merged to the Zend\Permissions\Rbac\Role
    class.

  • #34 removes the method Role::setParent(); use Role::addParent() instead.

Fixed

  • #30 fixes circular references within the Role::addChild() and Role::addParent() algorithms.