예제 #1
0
파일: response.py 프로젝트: ESS-LLP/frappe
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])
예제 #2
0
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])