Entity reference access
Categories
Component ID
2254231
Component name
Entity reference access
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
1348
Component created
Component changed
Component body
Description
This module adds new field formatters for entityreference which check access before displaying rendered entities. Views has access filters such as 'published', but entityreference rendered entity formatter only checks entity_access()
for the current user.
Current formatters
-
Role
Adds an access formatter for configurable role. This formatter is helpful if a user of one role wants to preview a list of referenced entities as another role without forfeiting their current role (ruling out solutions like Masquerade). For example, for an editor to use SPS preview mode, they must retain their current role.
Dependencies
- Entity reference
To do
- Make a patch to invoke something like
hook_field_formatter_view_alter()
orhook_field_formatter_prepare_view_alter()
. With one of those, we could then add our setting to the existing 'entityreference_entity_view' formatter withhook_field_formatter_info_alter()
,hook_field_formatter_settings_form_alter()
, andhook_field_formatter_settings_summary_alter()
.