You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Besides the usage within the authorization-middleware (https://github.com/mezzio/mezzio-authorization/blob/master/src/AuthorizationMiddleware.php) via the isGranted() method I would like to be able to use it, in my case, inside a view helper to show/hide navigation items according to the route and currently logged-in user.
Problem is, I cannot access the isAllowed() of the Acl from outside the LaminasAcl. Neither can I extend the LaminasAcl to use the acl property as it is private.
I would need to hydrate the Acl another time by myself to be able to use it.
Some solutions I have in mind (either/or):
add an isAllowed() proxy method to the LaminasAcl
add a getAcl() to the LaminasAcl
move the new Acl() + resource/roles/rule hydration into its' own service/factory to request it via $container->get(Acl::class)
I'm happy to prepare a pull-request according to whatever the outcome is.
What do you think?
The text was updated successfully, but these errors were encountered:
Feature Request
Summary
As of now the laminas-permissions-acl gets created within the LaminasAcl factory (https://github.com/mezzio/mezzio-authorization-acl/blob/master/src/LaminasAclFactory.php#L46).
Besides the usage within the authorization-middleware (https://github.com/mezzio/mezzio-authorization/blob/master/src/AuthorizationMiddleware.php) via the isGranted() method I would like to be able to use it, in my case, inside a view helper to show/hide navigation items according to the route and currently logged-in user.
Problem is, I cannot access the isAllowed() of the Acl from outside the LaminasAcl. Neither can I extend the LaminasAcl to use the acl property as it is private.
I would need to hydrate the Acl another time by myself to be able to use it.
Some solutions I have in mind (either/or):
I'm happy to prepare a pull-request according to whatever the outcome is.
What do you think?
The text was updated successfully, but these errors were encountered: