#41072·frappe

ignore_user_permissions is a silent no-op on non-Link DocFields (breaks fetch_from + mandatory_depends_on combo)

Author: ews-pgasserCreated Jul 20, 2026Updated Sep 18, 2026
Labelsbug

Description of the issue

ignore_user_permissions: 1 on a DocField only has effect on Link/Dynamic Link fieldtypes — it's silently a no-op on Data/Text/etc, with no validation error to warn you. This matters because fetch_from on a Data field runs client-side via the permission-checked frappe.client.get_value, so if the current user is User-Permission-restricted on the source doctype, the fetch silently returns blank — and setting ignore_user_permissions on that Data field does nothing to fix it.

Combined with mandatory_depends_on on the same field, this produces a confusing "field not filled" save error on a field the user often can't even see (hidden: 1), with no clue why.

Context information (for bug reports)

Output of bench version crm 1.79.0 main (301228c) erpnext 16.28.0 version-16 (de59166) frappe 16.27.1 version-16 (f33ac3f) helpdesk 1.27.0 main (6b423f8) hrms 16.13.0 version-16 (e0142b1) insights 3.12.2 version-3 (db795c4) telephony 0.0.1 develop (e04272a) wiki 3.0.0 develop (3dd6507)

Steps to reproduce the issue

  1. DocType with Link field owner_employee (options: Employee) and Data field owner_email with fetch_from: "owner_employee.user_id", ignore_user_permissions: 1, hidden: 1, mandatory_depends_on: "eval:doc.owner_employee".
  2. Restrict a non-admin user via User Permission to only their own Employee record.
  3. As that user, set owner_employee to a different Employee and Save.

Observed result

Save is blocked client-side: "Missing Mandatory Field(s): Owner Email" — despite ignore_user_permissions: 1 being set, since that flag is never consumed for Data fields.

Expected result

Either ignore_user_permissions throws a validation error when set on a non-Link fieldtype, or fetch_from actually honors it and bypasses the permission check.

Stacktrace / full error message

No exception — silent no-op, plus a misleading client-side mandatory-field message.

Additional information

ignore_user_permissions is only read for Link/Dynamic Link fields in frappe core (desk/search.py, model/db_query.py, permissions.py, model/meta.py) — never for Data. Separately, mandatory_depends_on is enforced client-side only (public/js/frappe/form/save.js), never in document.py's _validate_mandatory, so the server-side fetch_from re-fetch (which IS permission-agnostic) never gets a chance to run before Desk blocks the save.

https://discuss.frappe.io/t/permission-problem-with-fetch-from-solved-but-is-there-a-better-way/91765/3