Skip to content

Field access for sorting and filtering (1.x)#875

Open
bitamar wants to merge 2 commits into
RESTful-Drupal:7.x-1.xfrom
bitamar:filter-access
Open

Field access for sorting and filtering (1.x)#875
bitamar wants to merge 2 commits into
RESTful-Drupal:7.x-1.xfrom
bitamar:filter-access

Conversation

@bitamar
Copy link
Copy Markdown

@bitamar bitamar commented Mar 6, 2016

Preventing filtering and sorting by fields that were hidden with hook_field_access.

@bitamar bitamar changed the title Field access for sorting and filtering Field access for sorting and filtering (1.x) Mar 6, 2016
}
if (field_info_field($property_name)) {
if ($field = field_info_field($property_name)) {
if (!field_access('view', $field, $this->entityType)) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this will require also passing the $this->getAccount() to field_access

@amitaibu
Copy link
Copy Markdown
Member

amitaibu commented Mar 7, 2016

Thanks. This will require also a simpleTest.. :)

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