diff --git a/frappe/www/printview.py b/frappe/www/printview.py index 8a0ce8fd2c..aa14f37b0a 100644 --- a/frappe/www/printview.py +++ b/frappe/www/printview.py @@ -288,6 +288,8 @@ def get_html_and_style( else: document = frappe.get_doc(json.loads(doc)) + document.check_permission() + print_format = get_print_format_doc(print_format, meta=document.meta) set_link_titles(document) @@ -317,6 +319,8 @@ def get_rendered_raw_commands(doc: str, name: str = None, print_format: str = No else: document = frappe.get_doc(json.loads(doc)) + document.check_permission() + print_format = get_print_format_doc(print_format, meta=document.meta) if not print_format or (print_format and not print_format.raw_printing):