fix(check_field_permissions): allow if no permissions defined

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2025-11-18 12:25:05 +05:30
parent 1ba9c14cd5
commit 07e8c987cb
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -699,6 +699,11 @@ class Engine:
if not self.apply_permissions:
return
# Skip field permission check if doctype has no permissions defined
meta = frappe.get_meta(doctype)
if not meta.get_permissions(parenttype=parent_doctype):
return
permission_type = self.get_permission_type(doctype)
permitted_fields = get_permitted_fields(
doctype=doctype,