Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to check if expression function exists? #171

Open
ioleo opened this issue Mar 21, 2014 · 0 comments
Open

How to check if expression function exists? #171

ioleo opened this issue Mar 21, 2014 · 0 comments

Comments

@ioleo
Copy link

ioleo commented Mar 21, 2014

also asked on stackoverflow

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant