fixes #5205 - fixed all authorized links with given action

*Reviewers please carefully review as this might affect security.*

All links that was "filtered" through authorized_for and had :action set were
not rendered correctly, which is now fixed.