ProcessWire 3.0.81 upgrades the Role editor

ProcessWire 3.0.81

This week's new version on the development branch makes major improvements to the Role editor, simplifying the setup of access control in ProcessWire. Previously you could just assign permissions to a Role in the Role editor, and you couldn't specify what template(s) those permissions would apply to. That could only be done in the Template editor's “Access” tab. So setting up page access control involved a dance between the Role editor and the Template editor. And this makes sense in many scenarios, but in others it could add confusion or increase the amount of time it took to setup a Role.

This week we upgraded the Role editor so that not only can you assign permissions to a Role, but you can also specify what templates those permissions apply to. Meaning, you can setup everything on one screen, which can save a lot of time and make things a lot more clear.

When you edit a role, it looks much like before except that some permissions (page-view, page-edit, page-add, page-create) have the list of access controlled templates ready for you to add the permission to. Just that is quite an upgrade relative to before. But ProcessWire 3.0.81 also supports the ability to add or revoke any page-edit related permission for a Role on a per-template basis.

For instance, maybe you want a Role to be able to delete one type of page and not another. Or maybe you want a Role to be able to publish some types of pages and not others. The capability was already in the core (in the Template “Access” tab), but a little cumbersome to configure and keep track of. You could also accomplish the same thing by creating multiple roles with different access settings, and then assign those multiple roles to a user. While quite powerful, this too was a bit cumbersome to setup and difficult to keep track of. Now you can do it all from the Role editor on a single screen, making things a lot simpler. However, note that a template must have access control enabled (an on/off toggle that must be “on”) before the template would appear as an option in the Role editor.

How it works

When you check the checkbox next to a page editing related permission, that enables the permission for templates that the user has page-edit permission to. This is essentially how the Role editor worked before. But now there is a new option: click the icon in the right column to reveal a list of templates that you can assign the permission to (or click it again to collapse). Rather than enabling the permission for all templates, you can selectively enable it for specific templates that you choose here. Alternatively, if you've checked the permission box that enables it for all editable templates (the default) then you have the option of revoking the permission from specific templates. See the screenshot above for examples of each.

If you've just added a new template to your site, then chances are you'll still want to use the Template editor Access tab to do this kind of configuration. But for nearly any other case, I think you may find this new Role editor adds clarity and saves time. I hope that you enjoy using it and please let me know how it works for you. Have a great weekend and enjoy the ProcessWire Weekly.

Comments

  • szabesz

    szabesz

    • 2 years ago
    • 50
    Thanks Ryan! It was the missing piece but not anymore :)
  • Tom Reno

    Tom Reno

    • 2 years ago
    • 50
    Epic! This will make managing permissions and tracking down issues SO much easier. Really looking forward to trying this out.
  • thetuningspoon

    thetuningspoon

    • 2 years ago
    • 20
    I'm happy to see the permissions system getting some more love. This looks like a great enhancement that will help clarify things at the same time. At the very least it should solve one of the most common PW beginners errors... Checking off a page-edit permission but not enabling it in the templates.

    Is it possible to create your own custom page- permissions and have them show up here?

 

PrevProcessWire 3.0.80, Pro module Q&A, CKEditor 5 and more

5

This week we've got a new version of ProcessWire 3.0.80. In this post we also look at how to create a language pack, and answer a lot of common questions about Pro module renewals, upgrades and more. Lastly, we take a brief look at the upcoming CKEditor 5. More 

Twitter updates

  • ProcessWire 3.0.133 adds a useful new Page::meta() method for a new type of page-specific persistent data storage, adds the ability for users to create their own bookmarks in Lister, and has a handy and time saving update for the asmSelect input type— More
    14 June 2019
  • New post: This week we’ll take a look at 3 different WEBP image strategies that you can use in ProcessWire 3.0.132+. Then we’ll dive into a major update for the Google Client API module, and finish up by outlining some useful new updates in FormBuilder— More
    31 May 2019
  • New post: This week we've added WEBP support in ProcessWire thanks to a GitHub pull request from Horst Nogajski. This enables you to have highly optimized image output in PW and I think you’ll really like the difference it makes— More
    24 May 2019

Latest news

  • ProcessWire Weekly #267
    In the 267th issue of ProcessWire Weekly we're going to cover the latest changes in the development branch of ProcessWire, introduce a new module called MarkupMenu, and highlight a brand new site of the week. Read on!
    Weekly.pw / 22 June 2019
  • ProcessWire 3.0.133 core updates
    ProcessWire 3.0.133 adds a useful new $page->meta() method for a new type of page-specific persistent data storage, adds the ability for users to create their own bookmarks in Lister, and has a handy and time saving update for the asmSelect input type. Read on for all the details, examples and screenshots.
    Blog / 14 June 2019
  • Subscribe to weekly ProcessWire news

“We were really happy to build our new portfolio website on ProcessWire! We wanted something that gave us plenty of control on the back-end, without any bloat on the front end - just a nice, easy to access API for all our content that left us free to design and build however we liked.” —Castus, web design agency in Sheffield, UK