Can't throw exception from inside symfony security Voters -


i using custom symfony voters , using unanimous strategy. access decision manager loops on voters , isgranted return boolean.

we can't throw exception inside voter know why access denied. want know voters has denied access , why can show appropriate messages user take action e.g. upgrade perticular subscription. best way ?

a algorithm be:

  • throw exception inside voter
  • catch manager, store array or object , continue
  • after chain (loop) finished, check if manager "collected" exception , behave accordingly

Comments

Popular posts from this blog

xml - Extract substrings with XSLT -

math - "ELO Rating" and how does "TSR Rating" work? -

How can do a tuple comparison in coffeescript similar to that in python? -