fix(Report): validate 'Script Manager' role only for report type 'Script Report'
This commit is contained in:
parent
f0f2f001c2
commit
9a23312ad7
1 changed files with 1 additions and 1 deletions
|
|
@ -30,7 +30,7 @@ class Report(Document):
|
|||
|
||||
if self.is_standard == "No":
|
||||
# allow only script manager to edit scripts
|
||||
if frappe.session.user!="Administrator":
|
||||
if self.report_type == 'Script Report' and frappe.conf.server_script_enabled and frappe.session.user != "Administrator":
|
||||
frappe.only_for('Script Manager', True)
|
||||
|
||||
if frappe.db.get_value("Report", self.name, "is_standard") == "Yes":
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue