Disallowing certain include types #896
Unanswered
countless-integers
asked this question in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Right now, adding includes to query params allows for "count" and "exists" variations of them. E.g.
would accept query params like
include[]=user
,include[]=userCount
orinclude[]=userExists
. This behaviour seems to be a consequence of this bit of code inAllowedInclude
.What I'd like to achieve is to prevent users from being able to use
userCount
anduserExists
include values (or at the very least, hide those options from the exception message thrown inAddsIncludesToQuery
.I've somewhat hacked my way to that result by setting suffix values for those parameters to an empty string (e.g. for
exists_suffix
), but this feels a bit brittle.What would you advise for me to do instead to get that functionality of disallowing those include types?
Beta Was this translation helpful? Give feedback.
All reactions