tink_web icon indicating copy to clipboard operation
tink_web copied to clipboard

Access body/query in @:restrict

Open kevinresol opened this issue 8 years ago • 1 comments

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) ?

kevinresol avatar Apr 28 '17 16:04 kevinresol

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.

back2dos avatar Apr 29 '17 10:04 back2dos