Apply User Role to Custom PHP file (entryPoint)

Hey guys,

I am not sure this was discussed here. I didnt find it :open_mouth:

Anyway - I have a few custom php files, registered as entrypoints, it all works great but the thing is - every user is able to use them.

Now I know roles can only affect modules and those are only custom files but still - is there a way to use roles to limit access to those files? Or do I have to do it manually? I suppose a manual way might be to adjust php in a way where it looks in DB and based on logged in user and its role it will not show the contents of this custom file…

But still - I thought there might be some straightforward way to do this with roles?

@medipharma
You can use logichook - ‘after_entry_point’. It will be work before code for all entry points.
Documentation here:

Thank I will try. Although I will probably use after_login :wink: