Jump to content
Lauren

Cannot View Unpublished Pages

Recommended Posts

Hi there,

I'm new to PW and loving it so far! I'd just like to know... is it possible to have view-only access for unpublished pages?

I can't seem to get that level of permission working without also having to grant EDIT access, which I don't want to do.

Thanks!

Lauren

Share this post


Link to post
Share on other sites

Welcome Lauren can you elaborate a little more on the case? Front end? I think there's ways around that but need more info.

Share this post


Link to post
Share on other sites

I'm guessing you're talking about allowing back-end users the ability to only view unpublished pages, but not be allowed to edit them. I remember wondering about this myself on day one of ProcessWire. Basically, go to the edit view of whatever page you want this view-only behaviour to apply to, then go to the settings tab and in there you'll see under "Status" the option... "Locked: Not editable". Check that, and now the page can be seen but not edited. I think that's what you're looking for.

EDIT: Oh yeah, and furthermore, you'll see the extra "who can access this page" options under there where you can adjust specific user permissions on a page-by-page basis.

Share this post


Link to post
Share on other sites

Do you mean viewing for unpublished or restricting viewing for published?

(Subtle difference here... :) )

(And I am still enjoying this wonderful Rioja!)

Share this post


Link to post
Share on other sites

"Locked: Not editable". Check that, and now the page can be seen but not edited.

Be aware this makes the page visible for guests as well. I’m not actually sure if what you’re looking for is possible in PW out of the box.

Share this post


Link to post
Share on other sites

Be aware this makes the page visible for guests as well. I’m not actually sure if what you’re looking for is possible in PW out of the box.

Ah, didn't know that, thanks! But I think the second option "who can access this page" is the solution. You can set up any number of permissions there on a user-by-user, page-by-page basis should you desire.

Share this post


Link to post
Share on other sites

Sorry all! I assumed I'd automatically get a notification when there was a reply! Now, I see that I needed to "Follow the topic" :)

Okay. So, here's what I'm looking to accomplish:

Essentially, what I'd like is a "reviewer" Role that I can give to users which allows them to log into the admin, see the Pages list and view any Page, both published and unpublished.

Here's what I've done:

  • Added a new Role called "reviewer" with page-view permission post-2808-0-79104300-1419877727_thumb.pn
  • Under the Access tab, on one of the templates, selected "Yes" to "...manage view and edit access..." and checked the View Pages permission post-2808-0-47360300-1419877728_thumb.pn
  • Created a new user with the "reviewer" role post-2808-0-27489900-1419877901_thumb.pn

When I log in, I don't see any Pages listed:

post-2808-0-26536500-1419877729_thumb.pn

Is there a setting or something I'm missing? I'm wondering if I just haven't fully grasped how the permissions and roles work---I have a sneaking suspicion that's the issue ;)

Share this post


Link to post
Share on other sites

Hi Lauren,

In PW a user needs page-edit permission to view the page tree in the admin. Of course you can disable their ability to edit anything using the Access tab on all templates.

I think this will achieve what you are looking for.

Share this post


Link to post
Share on other sites

Hi Lauren,

In PW a user needs page-edit permission to view the page tree in the admin. Of course you can disable their ability to edit anything using the Access tab on all templates.

I think this will achieve what you are looking for.

This fixed the issue of not seeing the Pages listed and I can also view the Pages as well. However, I still have the issue of not being able to view Unpublished Pages. They show up in the list, crossed out, like usual. But when I click them, no "view" button is displayed.

Do you mean viewing for unpublished or restricting viewing for published?

(Subtle difference here... :) )

(And I am still enjoying this wonderful Rioja!)

Ah yes. Good question :) Viewing for unpublished pages on the back-end.

I'm guessing you're talking about allowing back-end users the ability to only view unpublished pages, but not be allowed to edit them. I remember wondering about this myself on day one of ProcessWire. Basically, go to the edit view of whatever page you want this view-only behaviour to apply to, then go to the settings tab and in there you'll see under "Status" the option... "Locked: Not editable". Check that, and now the page can be seen but not edited. I think that's what you're looking for.

EDIT: Oh yeah, and furthermore, you'll see the extra "who can access this page" options under there where you can adjust specific user permissions on a page-by-page basis.

Yes, you got it. I tried your suggestion but it didn't make a difference. I do see the unpublished page in the list of pages, but when I click it nothing happens. I would expect a "view" button to appear, like with the other published pages.

Share this post


Link to post
Share on other sites

Sounds like a job for ProcessPreview?

I'm really glad you mentioned this module because I have a feeling that the client will probably want that feature at some point! However, it's not quite what I'm looking for.

What I'm looking for is the ability for a user with view-only permission to view unpublished pages that have already been created.

Currently, I'm at the point where unpublished pages do show up in the pages list, which is good. However, no view button is displayed when you click on them, like it does with the other, published pages.

Share this post


Link to post
Share on other sites

What I'm looking for is the ability for a user with view-only permission to view unpublished pages that have already been created.

I don't think (not positive) this is actually meant to be possible - I think this is by design - I actually get a message saying "You don't have access to list page X" when I try to click on a page to get the view/edit etc links.

A couple of options for you - neither of which is really what you want, but might be useful :)

The first module should be self-explanatory.

Regarding the second module - the workflow with this would be to publish the page, but protect it (also from the settings tab once the module is installed) - that way the view link will be displayed, but it won't be viewable by any guest user. You would probably also want to set it hidden so that it wouldn't show in the menu / searches etc.

Sorry, neither are ideal for your needs :)

If you want something closer to your original request, then you might need to some fancy hooking, unless I am totally wrong and missing something obvious :)

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By lenoir
      Is it possible to let people edit a page without having to have a user-role?
      My case is the following:
      Visitors fill in a form (Formbuilder) which is saved to pages. They get a confirmation email which could contain a unique editing link. In case they need to update some information, they can click on this link, edit the fields and save. 
      Am I totally off? Is there a better practice? 
    • By DV-JF
      Hi, 
      I'm using this kind of setup (https://processwire.com/blog/posts/language-access-control-and-more-special-permissions/#language-page-edit-permissions) in order to control the page edit permissions. Now I'm wondering if it's possible to hide the "none-ediable" language-tabs instead of striking them through.

      Many greets...
       
    • By Kiwi Chris
      I have a role that has page edit, view, and clone permissions on a specific template.
      If a page using the template is locked by a user in a role with lock/unlock permissions on the template , the only button alongside it in the page tree is view, for users who don't have lock/unlock permissions.
      If however, I also give the role page-lock permission on the template, they then get additional buttons, edit, copy, and unlock.
      I don't actually want to give this role unlock permissions, but I do want the copy (clone) button to display alongside the page in the page tree.
      Elsewhere, I've discussed how I've worked out how to create a hook to unlock the copy, but I want to keep the original page so a user without lock permissions can't unlock from the page tree it to make changes.
      Question: What method should I hook into to intercept any attempt to change the lock status?
    • By pwFoo
      Hi,
      I try to add page-edit-own and page-delete-own permissions, but it's strange...
      If a add the custom permissions it looks like both are children of page-edit respectively page-delete. I played with added / revoked permissions, but I can't get it work, that a user of a role just can delete own content.
      First the user can't delete any content and now the user can delete own and foreign pages 🤪
      Is there a tutorial to learn more about the PW permissions?
      Or do I have to rename the permissions to page-own-edit and page-own-delete to be independent from page-edit and page-delete?
    • By benbyf
      not sure why but PW adds any uploads as permissions 600 (e.g. images wont load after upload unless i go in with the same server user and change permissions to 755 or similar). This ever happened to any one else?
×
×
  • Create New...