fix(meta)!: Allow level 0 fields when a doc has been shared with user
This commit is contained in:
parent
25ba2822be
commit
d7026b8a26
1 changed files with 4 additions and 0 deletions
|
|
@ -595,6 +595,10 @@ class Meta(Document):
|
|||
self.get_permlevel_access(permission_type=permission_type, parenttype=parenttype, user=user)
|
||||
)
|
||||
|
||||
if 0 not in permlevel_access and permission_type in ("read", "select"):
|
||||
if frappe.share.get_shared(self.name, user, rights=[permission_type], limit=1):
|
||||
permlevel_access.add(0)
|
||||
|
||||
permitted_fieldnames.extend(
|
||||
df.fieldname
|
||||
for df in self.get_fieldnames_with_value(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue