fix: skip strict perm while writing on local document too (#32927)

It's harmless: https://github.com/frappe/frappe/pull/32798#issuecomment-2969391481
This commit is contained in:
Ankush Menat 2025-06-13 15:42:24 +05:30 committed by GitHub
parent b4686d83e6
commit 726474db94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -347,7 +347,7 @@ def has_user_permission(doc, user=None, debug=False, *, ptype=None):
if (
apply_strict_user_permissions
and doc.get("__islocal")
and ptype == "read"
and ptype in ("read", "write")
and (not docname or (docname and not frappe.db.exists(doctype, docname, cache=True)))
):
apply_strict_user_permissions = False