JMSSecurityExtraBundle
JMSSecurityExtraBundle copied to clipboard
How to check if expression function exists?
I want to validate a configuration file. One of the fields is "credentials" which should accept valid JMS/SecurityExtraBundle
expression, eg. isLocalUser()
or canPublishNews(object)
or hasRole('ROLE_API')
or even hasRole('ROLE_A') or hasRole('ROLE_B')
(see docs).
So.. given a string... how can I validate it's a valid JMS/SecurityExtraBundle expression without actually running the expression?
At the moment of config validation I don't have any security context (nor object context), only the credentials string, so running the expression is impossible.