From abff9626a61fcac866e4d0bee5086f5311d39fb5 Mon Sep 17 00:00:00 2001 From: KerollesFathy Date: Thu, 19 Mar 2026 19:23:38 +0000 Subject: [PATCH] fix: restrict public workspace rename to Workspace Manager --- frappe/desk/doctype/workspace/workspace.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frappe/desk/doctype/workspace/workspace.py b/frappe/desk/doctype/workspace/workspace.py index 1424e2a3d8..3d2373682d 100644 --- a/frappe/desk/doctype/workspace/workspace.py +++ b/frappe/desk/doctype/workspace/workspace.py @@ -112,6 +112,13 @@ class Workspace(Document): self.app = get_module_app(self.module) + def before_rename(self, old_name, new_name, merge=False): + if self.public and not is_workspace_manager() and not disable_saving_as_public(): + frappe.throw( + _("You need to be {0} to rename this document").format(frappe.bold("Workspace Manager")), + frappe.PermissionError, + ) + def clear_cache(self): super().clear_cache() if self.for_user: