fix: check shared documents as well

Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
Akhil Narang 2026-03-10 19:08:09 +05:30
parent 72007f636d
commit f9af4d2ff9
No known key found for this signature in database
GPG key ID: 9DCC61E211BF645F

View file

@ -705,7 +705,8 @@ class Meta(Document):
)
if 0 not in permlevel_access and permission_type in ("read", "select"):
if frappe.share.get_shared(self.name, user, rights=["read"], limit=1):
check_doctype = parenttype if self.istable and parenttype else self.name
if frappe.share.get_shared(check_doctype, user, rights=["read"], limit=1):
permlevel_access.add(0)
permitted_fieldnames.extend(