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

  • We added WebP image support this year and many have been adopting it in existing projects. We look at a process used for migrating existing websites to WebP images— from preliminary considerations to implementation & testing, w/lots of tips & tricks too: More
    16 August 2019
  • Core version 3.0.137 on the dev branch adds the ability to hook multiple methods at once, in a single call. This post details how it works and provides a useful example of how you might put it to use in your development environment— More
    2 August 2019
  • ProcessWire 3.0.136 updates our CKEditor version and adds a new backtrace() method to the core Debug class— More
    26 July 2019

Latest news

  • ProcessWire Weekly #275
    In the 275th issue of ProcessWire Weekly we're going to walk you through the new features included in ProcessWire 3.0.138, cover some WebP related stuff, and highlight recent forum posts and online resources. Read on!
    Weekly.pw / 17 August 2019
  • WebP images on an existing site
    In this post we’ll look at a process used for migrating an existing website to use WebP images. We’ll cover everything from preliminary considerations to implementation and testing, with lots of tips and tricks along the way.
    Blog / 16 August 2019
  • Subscribe to weekly ProcessWire news

“I am currently managing a ProcessWire site with 2 million+ pages. It’s admirably fast, and much, much faster than any other CMS we tested.” —Nickie, Web developer