- Issue created by @Anybody
- 🇩🇪Germany Anybody Porta Westfalica
I think we need a test module with a custom content entity to show the issue. As a mid-level users, the "view / edit / delete" permissions of that custon entity (as generated by drush gen) simply have no effect and you get access denied, until you comment out the
hook_entity_access()
logic of this module. - 🇩🇪Germany Anybody Porta Westfalica
It's not 100% sure the module has this issue, as I found it at entity_access_by_role_field ( 🐛 Incompatible with Entity Type's ::checkAccess() implementations Active ) but I think it's quite sure as they share a lot of code, also in this area.
The problem can be resolved by returning "NEUTRAL" (selected in the settings) instead of "FORBIDDEN".
So I think to mitigate this issue and decide, if it's a bug or intended to work like this, we should add information about the risks of using "FORBIDDEN" to the UI setting?
- 🇩🇪Germany Anybody Porta Westfalica
Okay, but in some cases (media entities for example) that indeed leads to access where there should be no access granted -.- So be careful. No general solution.
- Assigned to Grevil
- 🇩🇪Germany Anybody Porta Westfalica
In the first step we need tests to clearly reproduce the situation in code. Assigning @Grevil for this and to take a general look. Read the other issue and the information above carefully first.