ProcessWire Page Edit Permission Missing Field‑Level Restriction
26.5K reputation · 29 Sept 2022, 20:03 UTC
Desired field‑level edit control
Administrators need a role that can edit pages based on a template but should be prevented from modifying certain fields, such as internal metadata or hidden fields, while still allowing edits to other fields on the same page.
ProcessWire core grants edit permission at the template level, which makes all fields on a page editable for any user with that role. There is no built‑in setting to restrict individual fields, and administrators often resort to custom hooks or third‑party modules, which can introduce ordering issues and inconsistency.
The absence of a native mechanism forces site builders to evaluate trade‑offs between development effort, maintenance overhead, and potential data‑integrity risks when deciding how to protect sensitive fields.
Is there a core configuration option to enable field‑level edit restrictions? Can a hook be implemented reliably to lock fields without risking a race condition where the field is saved before the restriction runs? Are there any officially supported modules that provide field‑level permissions without requiring custom code?
1 answer
1 question comment
Use comments to ask for clarification. Post a solution as an answer.
26,525 reputation · 29 Sept 2022, 21:55 UTC
In ProcessWire 3.x the core permission model is role based at page, template and module scope, e.g. page-edit, page-create, template-edit. There is no built-in per-field edit permission matrix in core.
The admin edit screen builds all Inputfields assigned to a page’s template. Editability is therefore governed by whether the user can edit the page/template as a whole, with $page->editable() and the core permission checks enforcing page-level access. Field visibility or disabling is handled via Inputfield settings and hooks, not a native field permission table.
Practical check: open Admin > Access > Roles and inspect available permissions. No per-field edit deny exists in core for 3.x. Field-level restrictions are typically enforced with server-side hooks on ProcessPageEdit::buildForm or Page::saveReady, or via community modules.