Hi, i have a site were i use Views and ECK. In my view i list a bunch of different bundle stuff from one Entity type. Like an event, activity or heartbeat log. In some bundle i render entity reference of node who is display. All that stuf work great.
I notice one thing when i begin to play with the permission. I remove the Node->View published content for the anonymous and the content disapear in the refrence display of the entity who is excellent. But is there a way to have the same kind of permission for entity bundle with ECK ? Maybe it's the permission section itself who do not work with views ?!? I dot know. We should be able to control that the same way node and views work or have a similar reaction when user are not able to acces the entity.
If you need more detail let me know.
Thanks
Comments
Comment #1
a.milkovskyNode have better access implementation than other entities. See _node_query_node_access_alter(). I think we should implement something similar for ECK entities. Currently it is not possible because you will need hook_node_access and hook_node_access_records.
But hook_query_TAG_alter will work. See node_view_permissions_query_node_access_alter() as an example.
Comment #2
a.milkovskyExample of hook_query_TAG_alter() for entity type 'task'. 'task_access' tag is added authomatically:
You can easily extend it for any eck type using
foreach (EntityType::loadAll() as $entity_type) {