Reputation: 13
I have question about laminas navigation and acl. In my application, a user can have multiple roles non hierarchicals. But in the documentation, I have read that only one role should be passed to it via setAcl('myacl')->setRole('roleUder'). Because my users can have cumulative roles, how to apply them on navigation?
Upvotes: 0
Views: 167
Reputation: 26
More information in regards to your roles would be very helpful. You can only pass one role to the navigation helper.
If role A + role B grants privilege X
Then role B inherits from role A. Role B gets passed to the navigation helper.
As it stands now, you would need to provide roles as an array and override or delegate the navigation helper so that you can iterate roles and pass each to the Acl component. But this only solves part of your issue. If you are using configuration driven navigation containers it only supports a single role being passed. So you would also need to override the code that consumes the configuration to support passing it more than a single role per page.
Upvotes: 0