diff --git a/frappe/desk/doctype/workspace/workspace.py b/frappe/desk/doctype/workspace/workspace.py index 466ae17a47..d4afc30475 100644 --- a/frappe/desk/doctype/workspace/workspace.py +++ b/frappe/desk/doctype/workspace/workspace.py @@ -289,6 +289,16 @@ def update_page(name, title, icon, indicator_color, parent, public): public = frappe.parse_json(public) doc = frappe.get_doc("Workspace", name) + if ( + not doc.get("public") + and doc.get("for_user") != frappe.session.user + and not is_workspace_manager() + ): + frappe.throw( + _("Need Workspace Manager role to edit private workspace of other users"), + frappe.PermissionError, + ) + if doc: doc.title = title doc.icon = icon