Jump to content

Limit editability of page title field for specific pages


Neo
 Share

Recommended Posts

I created a user role with limited access for specific pages in order to avoid accidental page deletions.

I need to fine-tune this a bit further: For specific pages I need the title of the page to be non-editable.

What is the easiest way to achieve this?

I just found the PageEditFieldPermission module (http://modules.processwire.com/modules/page-edit-field-permission/),

which I haven't tested yet. Correct me if I am wrong, but scanning through the documentaton, it looks like you would have to manually reset all permissions for every single field on the particular page for that role:

"Once your new page-edit-[field] permissions are created, any non-superuser roles that previously had access to edit those fields will no longer have access to edit them. To give them access, you must edit a role and check the box for the relevant permission."

Link to comment
Share on other sites

Check out the latest version of PW - 2.7 just released.

post-985-0-10377900-1447458000_thumb.png

EDIT: Sorry, just read that you want it limited to specific pages. For this you might be better off with the dynamic roles module. I haven't checked if it can do exactly what you want, but worth a look: https://github.com/ryancramerdesign/DynamicRoles

Be aware that it does have a critical bug right now that might or might not affect your use: https://github.com/ryancramerdesign/DynamicRoles/issues/14

Alternatively if none of these work as needed, you should be able to create a simple hook to check if the page matches you rules and prevent the title from being changed. No time for an example right now, but maybe someone else will chime in.

Link to comment
Share on other sites

@adrian The site I am working on runs on ProcessWire 2.6.1.

The DynamicRoles module sounds a bit like trouble like Soma states in this epic comment  ;) :

"I'm not sure what this module is used for or if it's even used anywhere . But currently the drawbacks this module brings (if assuming it's working) defeat its own purpose."
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...