fix: Allow only search fields for select permission type
This commit is contained in:
parent
7d2f9be609
commit
a1f59c5a82
1 changed files with 6 additions and 3 deletions
|
|
@ -542,12 +542,15 @@ class Meta(Document):
|
|||
if self.istable and not parenttype:
|
||||
return permitted_fieldnames
|
||||
|
||||
if not self.get_permissions(parenttype=parenttype):
|
||||
return self.get_fieldnames_with_value()
|
||||
|
||||
if not permission_type:
|
||||
permission_type = "select" if frappe.only_has_select_perm(self.name, user=user) else "read"
|
||||
|
||||
if permission_type == "select":
|
||||
return self.get_search_fields()
|
||||
|
||||
if not self.get_permissions(parenttype=parenttype):
|
||||
return self.get_fieldnames_with_value()
|
||||
|
||||
permlevel_access = set(
|
||||
self.get_permlevel_access(permission_type=permission_type, parenttype=parenttype, user=user)
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue