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

Feature to avoid filtering or sorting on columns that are not rendered #4

Merged
merged 8 commits into from
Dec 19, 2017

Conversation

yulioaj290
Copy link
Contributor

Added some new features to avoid filtering or sorting on columns that are not rendered.

The "excluded_attributes" configuration property was used to identify the not rendered columns and a new configuration property have been created, "strict_filtering_and_sorting" under security section, to tell to the bundle to ignore or not the excluded attributes used into the filtering or sorting.

The documentation has been updated properly.

{
if ($this->strictFilteringAndSorting && $resourceConfig->isAttributeExcluded($resourceConfig->getRealPath($path))) {
if ($this->jsonApiDebug) {
throw InvalidRequest::createWithMessage($key, 'invalid_path', sprintf('There is no path called %s', $path));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yulioaj290 You forgot the else part

@trivago-makbarof trivago-makbarof merged commit fbbc70d into trivago:master Dec 19, 2017
@trivago-makbarof
Copy link
Contributor

@yulioaj290 Thanks for the PR

@yulioaj290
Copy link
Contributor Author

@trivago-makbarof you're welcome.

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

Successfully merging this pull request may close these issues.

2 participants