zendframework / zend-permissions-rbac

Create and query role-based access controls.
BSD 3-Clause "New" or "Revised" License
44 stars 23 forks source link

getPermissions will only return the first permission #38

Closed bakkerpeter closed 6 years ago

bakkerpeter commented 6 years ago

The method getPermissions() will only return the first permission of every role due to the way it is written: $permissions = (array) key($this->permissions); Role::79

My simple suggestion would be to fix this like this: $permissions = array_keys($this->permissions);

Update: I've added a PR https://github.com/zendframework/zend-permissions-rbac/pull/39

ezimuel commented 6 years ago

Fixed in #39.