Closed (works as designed)
Project:
Entity Construction Kit (ECK)
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
25 May 2018 at 18:53 UTC
Updated:
19 Aug 2024 at 05:00 UTC
Jump to comment: Most recent
Comments
Comment #2
handkerchiefComment #3
handkerchiefanyone with a hint?
Comment #4
handkerchiefComment #5
handkerchiefComment #6
murzSeems I have same issue, did you find any workaround?
In Router I try to check ECK entity access permission via:
and this page always return permission denied, even for Admin user, that have all permissions.
Comment #7
handkerchiefMy workaround: Handle the permission in a hook_form_alter
If the user has no permission, set: $form['#access'] = FALSE;
Comment #8
alex.ksis commentedI tried to use hook_entity_access and it is really does not work. However I do not think that this is a bug as there is a separated hook: hook_entity_create_access()
Comment #9
matroskeenFor create operations use
hook_entity_create_access(), andhook_entity_access()for others.See: https://www.drupal.org/node/2095227.
Comment #10
fox mulder commentedA reminder to those who do similar work: access hooks doesn't fire for admin ( uid=1 )
Comment #11
andres.torres commentedIm experiencing the same issue, hook_entity_access or hook_eck_entity_access dont work on drupal 8.7.1. Eck entities just wont show up on View state
Comment #12
zebda commentedHaving the same problem, what can I do to solve this?
Comment #13
dieterholvoet commentedCheck the responses by Matroskeen and fox mulder. Everything seems to be working as expected here. If you're still having problems, please create a new issue with a specific description of the problem and clear steps to reproduce.
Comment #14
garethhallnz commentedI just encountered this problem too. After some debugging, I discovered that the issue was due to having the "bypass ECK entity access" permission. When you have this permission, the hook_entity_access is never called.
As per /src/EckEntityAccessControlHandler.php#L52