Jump to content

Recommended Posts

Is there a way to lock down (via role) the ability to update / publish a page live?

My client needs some people to be able to edit a page, but the page changes must be reviewed by another member of staff who have access to push the update live.

Is this possible?


Share this post

Link to post
Share on other sites

There's currently no drafting feature in ProcessWire. A page is therefore either live or not and there's always only a single version of a page to save to. 

Share this post

Link to post
Share on other sites

It is possible I guess...

If you hook to page::loaded, you can get the status and cache it to a variable.

Then before pages::save you could check the status and role, when the status has changed, you could re-assign the cached status.

Share this post

Link to post
Share on other sites

This only works as long as a page isn't live. As soon as it's published all changes to it will be published, too. A page does currently always have a single state in the database to which you save your changes. There's no second set of "draft" values.

Share this post

Link to post
Share on other sites

Ah i see :/

Taking the version control module @teppo created, which adds multiple versions of fields, it may not be too hard to tweak this to create a "Draft" stage.

Would you guys agree?? it may not be that simple, but in theory it would work?

Share this post

Link to post
Share on other sites

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

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By VeiJari
      Hi, this is the first we are trying to make a page that has only one type of user that has access to every page. 
      The other users should only have a given access to specific pages, not to the whole template.
      My structure
      -Field -Organisation -Project -Report I want that the "measurer" role only has access to "project x" and it's children, but no view access to every project, organisation or field. I've tried to do this with https://modules.processwire.com/modules/page-edit-per-user/ but it still needs a view access to the whole tree to see the "project x" page. Or is there something I haven't figured out?
      Maybe I have to make it via the API: a select field in the "organisation" template where the admins could add the users and then I use hook to update the privileges?
      Have you done something like this and how did you accomplish it?
      Any help would be appreciated.
    • By louisstephens
      So I ran into a very strange issue today. I have a template with a pagetable and I went to add an item to it, when I went to select an image (for an image field) the page instantly threw up an error
      "ProcessPageSearchLive: No search specified"
      The page's content also switched to the image attached. This all worked perfectly last week (local mamp box). Has anyone experienced this before, and how did you solve it?

    • By snck
      Hey there,
      for a client website I need to implement a "reviewer" role. "Reviewers" should be able to review new (unpublished) articles to give feedback to editors, but not have the permission to change them. 
      I built a new "reviewer" role that only has page-view permissions for the respective templates, but this permission does not include viewing unpublished pages. How can I grant them access to the unpublished articles without giving them page-edit permission?
    • By Pip
      Hi everyone, 
      Is there a way for us to replicate the "http://mydomain.com/processwire/page/edit/?id=xxx" and change the template to match my site template? 
      I'm terribly happy with the admin / backend page edit. It covers literaly everything I want to empower my non super admin user in updating pages such as validation, repeater management, file upload. 
      I wish not to allow the users to see the backend for both security and aesthetic reasons. 
      Thanks and hope to hear from you soon. 
  • Create New...