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
Post a Comment