fix: improve perm check ux

This commit is contained in:
Priyal 2026-03-13 22:08:02 +05:30
parent a3af66a6e1
commit bfc3c5586c

View file

@ -208,6 +208,19 @@ def has_permission(
debug and _debug_log("Checking if document/doctype is explicitly shared with user")
perm = false_if_not_shared()
# select permission is implied by read permission
if not perm and ptype == "select":
perm = has_permission(
doctype,
ptype="read",
doc=doc,
user=user,
parent_doctype=parent_doctype,
print_logs=print_logs,
debug=debug,
ignore_share_permissions=ignore_share_permissions,
)
return bool(perm)