fix(print): Check doc permission before checking related info
This commit is contained in:
parent
d78b967f8d
commit
cff0567faf
1 changed files with 4 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue