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

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -