def download_private_file(path): """Checks permissions and sends back private file""" try: check_file_permission(path) except frappe.PermissionError: raise Forbidden(_("You don't have permission to access this file")) return send_private_file(path.split("/private", 1)[1])
def download_private_file(path): """Checks permissions and sends back private file""" try: check_file_permission(path) except frappe.PermissionError: raise Forbidden(_("You don't have permission to access this file")) return send_private_file(path.split("/private", 1)[1])