Jump to content

Cannot View Unpublished Pages


Lauren
 Share

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

Link to comment
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.

Link to comment
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.

Link to comment
Share on other sites

  • 1 month later...

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 ;)

Link to comment
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.

Link to comment
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.

Link to comment
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.

Link to comment
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
Link to comment
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
 Share

×
×
  • Create New...