Allow a User Group to access plugin pages (without hasCpSection) I'm facing a problem which, on the surface, seems similar to this thread...

Like that other thread, I've found that a specific user group is unable to access my plugin's pages because the plugin is lacking a hasCpSection method. My plugin doesn't need a hasCpSection method, because there really isn't a "section" for people to access. Specifically, I don't need a link in the side nav, because my plugin doesn't have a main index page.

However, my plugin does have other pages. These other pages are only accessible via special links. Those special links appear on Entry edit pages, as a custom Fieldtype. These random pages are what I want my client to have access to.



And that's where I'm unable to use the solution provided in the related thread. Because when I link directly to a template, those pages are restricted by default. There's no way for me to "allow anonymous". I would have to give the user group full admin access (which is crazy), and then circle back and restrict permissions on the page.

Any suggestions? This kinda feels like a bug to me, or perhaps a feature request.
Register new user permissions to restrict access to those pages using the registerUserPermissions hook.
Then use registerCpRoutes to setup routes to a controller action which checks for required user permissions before rendering the templates.

Sorry if I’m missing something, but I don’t see how this has anything to do with the hasCpSection function.