fix: getting workspace roles from doc instead from Has Role doctype
This commit is contained in:
parent
c3db5fca23
commit
cbb80ed0ee
1 changed files with 1 additions and 3 deletions
|
|
@ -72,9 +72,7 @@ class Workspace:
|
|||
"""Returns true if Has Role is not set or the user is allowed."""
|
||||
from frappe.utils import has_common
|
||||
|
||||
allowed = [
|
||||
d.role for d in frappe.get_all("Has Role", fields=["role"], filters={"parent": self.doc.name})
|
||||
]
|
||||
allowed = [d.role for d in self.doc.roles]
|
||||
|
||||
custom_roles = get_custom_allowed_roles("page", self.doc.name)
|
||||
allowed.extend(custom_roles)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue