Jump to content
BillH

Page-edit permission not working

Recommended Posts

I feel as if I must be missing something really massively obvious, but the page-edit permission has stopped working, except for superusers.

For non-superusers with page-edit permission, the Edit button is not appearing on page listings. And if I go directly to a page's URL (e.g. ...page/edit/?id=123) there's the error message "ProcessWire: You don't have access to edit".

Note that Edit Pages access is given on the template pages, so that's not the cause of the problem.

There was no problem until recently. Unfortunately, I'm not quite sure when this issue started, as I've been working on the site as a superuser, and noticed only when testing as a non-superuser. Thus it's difficult to work out what might have triggered the issue.

I have tried turning permissions on and off, creating new roles and users, clearing caches, removing and adding Edit Pages access to templates, and turning off any modules that I suspect might interfere with permissions (though I'm not sure any actually would).

Any ideas for what to try next?

Share this post


Link to post
Share on other sites

I'm still completely stuck on this and have tried everything I can think of - including moving the system to a new database (in the same way as I would if moving to a new server).

Does anyone have any clues at all?

The horrible prospect of many days rebuilding the system from scratch is looming, so any help gratefully received!

Share this post


Link to post
Share on other sites

I haven't heard of this issue occurring before. Suggestions...

1. If you have added any hooks in /site/ready.php or /site/init.php then temporarily remove those while you are investigating the issue.

2. Concentrate on granting edit access to the home template first. That template is a good place to start because it isn't affected by access inheritance.

3. Check the edit access settings at Access > Roles > your_role...

2018-05-31_101646.png.696e7d0c26bb7479862592a308635859.png

...and at Setup > Templates > your_template...

2018-05-31_101734.png.7750f45d17d7e8c4005373ff98d3eefa.png

4. Install the Access Overview module as another way to view and verify edit access.

Share this post


Link to post
Share on other sites

Thanks, Robin S, these look like really useful suggestions. I've certainly tried suggestion 3 already (many times!), but I'll get on with 1, 2 and 4. I'll report back.

Share this post


Link to post
Share on other sites

Strangely, the problem has gone away all by itself!

Obviously this is a good thing for the project, but it means that I don't know the cause of the trouble and can't offer a solution.

The only thing I can think of that I changed and that might have affected permissions in some way - though this is a total guess - is that I discovered an image field which, for no reason I'm aware of, had access control enabled (I may have accidentally clicked something or done something through the API). It's possible, though I can't think why, that disabling this access control triggered the resolution of the issue.

If anyone else comes across this problem, it'd be interesting to know how they fix it.

Share this post


Link to post
Share on other sites

Hi,

I've come across this problem or a similar one. For me it was because I've added the "page-publish" permission. To allow a user to edit a page, the "page-publish" had to also be checked. However I am using ProDrafts and didn't want to allow this.

Finally saw that @ryan published a dev version of ProDrafts about a week ago and installing it completely solved the issue.

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.

×
×
  • Create New...