- Issue created by @Grevil
- Merge request !9Issue #3525767: Integrate ad content type level permissions using "permission_callbacks" and "AccessControlHandler" → (Merged) created by Grevil
- 🇩🇪Germany lrwebks Porta Westfalica
Per-entity-type permission granularity is now working!
There is still one problem that I am facing right now:
I have added aview ads
permission, as we will definitely need that later on. However, the check for that permission inAdContentAccessControlHandler
seems to get overridden by the admin permission for the ad content (administer ads
) and I can't figure out where that happens or how to get rid of the override yet.Ask an API suggests that a possible fix would be to implement
hook_node_view_alter()
, but that seems like a hack to me.@grevil what do you think?
- 🇩🇪Germany lrwebks Porta Westfalica
Everything should be working as expected now. Edit, create and Delete permissions for any and all ad types as well as a new permission to choose to whom ads will be shown.
- 🇩🇪Germany lrwebks Porta Westfalica
I suppose that this issue would also resolve ✨ Add roles permission Bypass ADs tracking (Track ADs exclude for whis roles.) Active ? But I'm not sure, so I left a more detailed question regarding our progress in this issue there.
- 🇩🇪Germany Anybody Porta Westfalica
@lrwebks re #8: No, but let's solve that separately over there.
I'll merge this one now, thanks! It also fixes a regression in https://git.drupalcode.org/project/ad/-/merge_requests/9/diffs?file=a7ca...