Jump to content

[Solved] Select options field: options won't save with custom user role


nurkka
 Share

Recommended Posts

Hi,

I'm maintaining a multilanguage website where two different design companies have access to the processwire backend. For one of the teams I created a custom user role called "designadmin", where I activated the permissions "field-admin" and "template-admin", so the designers are able to edit fields and templates. This worked very well, but now, they wanted to create a select options field, and then change the values of the options. When clicking "Save" in the ProcessWire backend, the changed values won't save and are immediately restored to their previous values. Screenshot:

image.png.37d6212ec55ca548f641fe8438a94454.png

When logging in as superuser, these values can be changed and saved successfully.

How can I give the design team the permission to change and save options values, without giving them superuser access?

Thank you for your help!

 

Link to comment
Share on other sites

You could change your Select Options fields to Page Reference fields. Page Reference fields are more powerful and flexible and the better choice in most cases. One of the advantages is that users can edit, sort, add and remove options for fields simply by working with the pages that represent the options.

You can create a References branch in your page tree to hold the option pages for your Page Reference fields, and the Page Field Select Creator module is useful for quickly setting up new fields.

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

Thank you both! In the meantime I have found the corresponding line of code in the FieldtypeOptions module. Before saving the options, ProcessWire checks, if the current user is a superuser. So any non superusers cannot save option values (in the current / newest ProcessWire version 3.0.148). So I modified the corresponding if statement, in order to allow users with "field-admin" permission.

Thanks again for your suggestions. I took the opportunity to take a closer look at Tracy Debugger and I will definitely keep the page field select module in mind.

  • 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...