-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Do not show all objects if collection is given nil #595
Comments
👍 for something like that. |
Sounds ok to raise an exception when As a side note, we'd expect something like that to be caught by the developer before sending something to production, hopefully :D. |
What about just render a blank select without exception? |
@nashby for me sounds good. |
Yeah, I think it's fine 🤘. |
The problem
Let's asume the following piece of code:
This will show the list of documents that come from the
@documents
variable.BUT when the variable is not assigned (probably by mistake, not being speced) and thus is treated as
nil
, then all the documents are loaded.This is a "security" flow because all users from all projects will see all documents on the system.
Proposed solution
If
nil
(or something non-eumerable I guess) is passed ascollection
option, then raise an exception warning about it.For backwards compatibility it may be an configuration option that can enable this behaviour.
The text was updated successfully, but these errors were encountered: