Jump to content

Permissions for "Page Reference" field linked to "Users"


johnstephens
 Share

Recommended Posts

Hi!

I created a page reference field linked to ProcessWire's "Users" page array. I do not have "create new pages" enabled for the field, and I don't want to use this field to create new users.

When I am logged in as the superuser, it works as intended: I can select one or more registered users and associate them with the current page.

But when I log in under a different role, the page reference field is empty, and does not allow me to select any users.

I've checked the permissions for the role that I want to authorize to use the this field, and the permissions under the "Access" tab on the field itself. I don't see any role-based permissions I could add to the role that seem pertinent to this issue. Under the field's "Access" tab, I have added "View" and "Edit" privileges for the given role, but that does not seem to change the behavior at all.

Can anyone offer some guidance in troubleshooting this? I know there must be some privileges I have not considered, but I don't know where to look.

Thank you all in advance!

Link to comment
Share on other sites

Thank you, @adrian!

That seems to cause ProcessWire to choke when loading a page in the editor.

If I set the selector to this:

template=user, roles=managing_editor

It works perfectly for a superuser. The above selector throws no error when loading the editor using my managing_editor role—it simply doesn't populate the options.

But if I set the selector to this:

template=user, roles=managing_editor, check_access=0

ProcessWire throws this error, no matter what role I log in with:
Unknown Selector operator: '' -- was your selector value properly escaped?

Thanks again! I appreciate any insight someone might offer. Cheers!

Link to comment
Share on other sites

On 2/14/2019 at 10:36 AM, johnstephens said:

But if I set the selector to this:


template=user, roles=managing_editor, check_access=0

ProcessWire throws this error, no matter what role I log in with

This kind of selector is working for me with superuser and non-superuser roles.

Did you type the "check_access=0" into the selector string by hand or did you copy/paste from @adrian's post? Because I'm seeing non-printable characters when pasting from the post:

2019-02-15_153910.png.459a140e0efe8cac511ad6314a3b446b.png

@Pete, this non-printable character issue is getting quite bad in the forums lately and can cause a lot of confusion. I don't understand how these characters are creeping into posts seeing as I'm sure nobody is entering them deliberately. Do you know if anything can be done to avoid this issue?

  • Like 5
Link to comment
Share on other sites

13 hours ago, Robin S said:

copy/paste from @adrian's post?

I recommend using tools like:

For Plain Clip.app and similar one can setup a global shortcut launching some simple custom made script – I use the commercial Keyboard Maestro but there should be free alternatives out there – so that one can easily paste clean text no matter what the source is.

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

I have the exact same problem.
I have a page ref field for user selection, and no role, but the superuser, can find users.
Under »Input« I have »Users« withing the »Parent« section of »Selectable Pages«,
and a »custom find« to to the special role gives no entries for the logged in user (as OP) (Roles Name Equals Reseller | @roles.name=reseller | it matches 10 pages.)
Is check_access the solution for this, and how would I implement it within the page field?

thx

Link to comment
Share on other sites

43 minutes ago, ocr_b said:

Is check_access the solution for this, and how would I implement it within the page field?

In your custom find, choose Custom (field=value) and enter check_access=0 in the far right column.

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

16 hours ago, adrian said:

In your custom find, choose Custom (field=value) and enter check_access=0 in the far right column.

331225368_Screenshot2019-03-2009_16_00.thumb.jpg.19593794593e88d6ee7e010fe25ce577.jpg

SQL Error?
Solved by making my own selector string.

Can you also explain a bit this a bit deeper? From the docs:
»Include pages that user doesn't have access to view.«
— Why is the user not having access to the pages even though it has user-admin permissions?
— How is it possible to give the user the rights to see the pages without check_access?

Thanks!

  • 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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...