fix: check shared documents as well
Signed-off-by: Akhil Narang <me@akhilnarang.dev>
This commit is contained in:
parent
72007f636d
commit
f9af4d2ff9
1 changed files with 2 additions and 1 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue