1 Like
@abhirock74 You van add server script on Before Insert & script type will be Doctype Event.
Code :
user = frappe.session.user
is_admin = frappe.db.get_value(“Has Role”, {“role”: “System Manager”, “parent”: user}, “name”) is not None
if not is_admin:
frappe.throw(“To Create Workspace Need An Admin Previleges”, frappe.ValidationError)
is there any valid reason to restrict end users from personalizing their own workspaces?
Public workspaces can only be created by users with Workspace Manager
role by default.
2 Likes