fix(Workspace): check perms on deletion (#28315)
This commit is contained in:
parent
881d8c8597
commit
09cdf32f00
1 changed files with 4 additions and 0 deletions
|
|
@ -118,6 +118,10 @@ class Workspace(Document):
|
|||
if doc.title != doc.label and doc.label == doc.name:
|
||||
self.name = doc.name = doc.label = doc.title
|
||||
|
||||
def on_trash(self):
|
||||
if self.public and not is_workspace_manager():
|
||||
frappe.throw(_("You need to be Workspace Manager to delete a public workspace."))
|
||||
|
||||
def after_delete(self):
|
||||
if disable_saving_as_public():
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue