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

Access body/query in @:restrict #31

Open
kevinresol opened this issue Apr 28, 2017 · 1 comment
Open

Access body/query in @:restrict #31

kevinresol opened this issue Apr 28, 2017 · 1 comment

Comments

@kevinresol
Copy link
Member

Currently if we try to access body/query in @:restrict like so:

@:restrict(user.id == body.id)

It will fail with something like undeclared identifier "body".

Would it be possible to parse the body before the check (maybe only if the restrict meta needs it) ?

@back2dos
Copy link
Member

For the query it should work (in theory). For the body, this is is pretty much intended, because we don't want to begin body parsing before access is granted. But I suppose we can allow reversing that order.

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

2 participants