fix: restrict resetting of form tours (#39026)
This commit is contained in:
parent
a921de1fc6
commit
1b2cf94563
1 changed files with 1 additions and 0 deletions
|
|
@ -76,6 +76,7 @@ class FormTour(Document):
|
|||
|
||||
@frappe.whitelist()
|
||||
def reset_tour(tour_name: str):
|
||||
frappe.only_for("System Manager")
|
||||
for user in frappe.get_all("User", pluck="name"):
|
||||
onboarding_status = frappe.parse_json(frappe.db.get_value("User", user, "onboarding_status"))
|
||||
onboarding_status.pop(tour_name, None)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue