Pergunta

Well in ZF1 there was the isAllowed view helper to check the ACL in the view.

But I can't find an equivalent of it for ZF2. The closest I got was the ZF2 navigation view helper, but the problem with that is that it requires a AbstractPage. I just want to throw a resource/privilege to it, example:

$this->allowed('resource', 'privilege');

Is there not such a view helper, or am I looking at this all the wrong way?

Foi útil?

Solução

Well I couldn't find any view helper, neither got any response so I wrote my own view helper.

isAllowed view helper code

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top