Jump to content

Recommended Posts

Posted

Template Access

A Process module that provides an editable overview of roles that can access each template.

The module makes it quick and easy to see which templates have access control enabled (personally I like to ensure I've enabled it for every template) and to set the appropriate access per template.

Usage


The Template Access page under the Access menu shows access information for all non-system templates in a table.

You can filter the table rows by template name if needed.

Click an icon in the table to toggle its state. The changes are applied once you click the "Save" button.

Sometimes icons cannot be toggled because of logical rules described below. When an icon cannot be toggled the cursor changes to "not-allowed" when the icon is hovered and if the icon is clicked an explanatory alert appears.

  • A role must have edit access before it can be granted create access.
  • If the guest role has view access for a template then all roles have view access for that template.

ta-1

 

https://github.com/Toutouwai/ProcessTemplateAccess
https://processwire.com/modules/process-template-access/

  • Like 13
  • Thanks 3
Posted

I received a suggestion from @monollonom that it would make more sense if the module appeared under the Access menu rather than the Setup menu. I agree so I've changed to this in v0.1.5. If you've installed < v0.1.5 and you'd like to have the module under Access then there a couple of ways to do this. First update to v0.1.5 and then either...

  • Uninstall the module, and then reinstall the module so the page will be automatically created under Access during install.
  • Or move the "Template Access" page within the Admin branch from under Setup to be under Access.
  • Like 4
Posted

First of all: Great module, I really like to have an overview, because I got many templates (20) with access roles
Improvement suggestion: I would like it even more if it just modifies the standard template overview instead of adding a new one. What do you think of that?

  • Like 1
Posted
10 hours ago, dotnetic said:

First of all: Great module

Thanks.

10 hours ago, dotnetic said:

Improvement suggestion: I would like it even more if it just modifies the standard template overview instead of adding a new one. What do you think of that?

Maybe that would be been a viable alternative if I had investigated it at the start, although I think there would be a lot of challenges (for example, MarkupAdminDataTable doesn't provide the necessary hooks). But I've been using this module privately for some years now and I think it does the job just fine so I don't want to reinvent it all now.

  • Like 2
  • 1 year later...
Posted

Thanks for this module.  I've been using it a lot recently given that the web app I'm building makes heavy use of roles and permissions and I appreciate the "helicopter view" the module gives you.

Recently, I've been using access rules on fields within the context of a template.  Unfortunately, ProcessWire doesn't have a "helicopter view" of being able to see those settings, which means you have to go into each template and click on a field to bring up the modal, then go to the access tab to see what the settings are.  Now imagine having to do that for dozens of fields.

I wonder if you've dealt with that and if a feature like that makes sense for this module (or if it's out of scope).

Posted
6 hours ago, Jonathan Lahijani said:

I wonder if you've dealt with that and if a feature like that makes sense for this module (or if it's out of scope).

I think it is out of scope for this module, but it sounds like a useful thing to have in a separate module. I'll add it to my list of things to do.

  • Like 1
Posted
6 hours ago, Jonathan Lahijani said:

which means you have to go into each template and click on a field to bring up the modal, then go to the access tab to see what the settings are.  Now imagine having to do that for dozens of fields.

FYI, you can view all the template access overrides for a field on the Overrides tab of Edit Field.

image.png.44b263419a680754025da587844b545c.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...