nurkka Posted January 9, 2020 Share Posted January 9, 2020 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: 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 More sharing options...
dragan Posted January 9, 2020 Share Posted January 9, 2020 You should check first if this is really a permission issue or something else. Enable Tracy Debugger's user switcher, and then switch to one of those agency accounts and try to reproduce that behavior. Check the browser console for errors, and of course if Tracy is reporting anything. 1 Link to comment Share on other sites More sharing options...
Robin S Posted January 9, 2020 Share Posted January 9, 2020 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. 1 1 Link to comment Share on other sites More sharing options...
nurkka Posted January 10, 2020 Author Share Posted January 10, 2020 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. 1 Link to comment Share on other sites More sharing options...
nurkka Posted January 14, 2020 Author Share Posted January 14, 2020 Problem solved – Ryan pushed a fix:https://github.com/processwire/processwire/commit/f5f83e814880c862b5bfd0ee935b8c9e7699bd74 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now