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

Hoist whitelist/blacklist checks further up stack #242

Open
CyberiaResurrection opened this issue May 30, 2020 · 0 comments
Open

Hoist whitelist/blacklist checks further up stack #242

CyberiaResurrection opened this issue May 30, 2020 · 0 comments
Labels

Comments

@CyberiaResurrection
Copy link
Contributor

The current approach, especially for retrieving relationships, can be fraught with problems.

Line 89 of ModelReflectionHelper executes the relation method directly, which exposes execution to any and all exception throws, typos, etc. Whitelisting/blacklisting is currently applied after all fields, casts and relations are processed.

Best idea I've got at the moment is to apply getHidden/getVisible inside getModelClassMethods of the ModelReflectionHelper to (attempt to) obviate those calls.

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

No branches or pull requests

1 participant