Fix receipt downloading by properly loading the permissions for the user/org
This commit is contained in:
parent
de91a9872b
commit
e685dced84
1 changed files with 2 additions and 0 deletions
|
@ -10,6 +10,7 @@ from urlparse import urlparse
|
||||||
from data import model
|
from data import model
|
||||||
from data.model.oauth import DatabaseAuthorizationProvider
|
from data.model.oauth import DatabaseAuthorizationProvider
|
||||||
from app import app
|
from app import app
|
||||||
|
from auth.auth import require_session_login
|
||||||
from auth.permissions import AdministerOrganizationPermission
|
from auth.permissions import AdministerOrganizationPermission
|
||||||
from util.invoice import renderInvoiceToPdf
|
from util.invoice import renderInvoiceToPdf
|
||||||
from util.seo import render_snapshot
|
from util.seo import render_snapshot
|
||||||
|
@ -152,6 +153,7 @@ def privacy():
|
||||||
|
|
||||||
|
|
||||||
@web.route('/receipt', methods=['GET'])
|
@web.route('/receipt', methods=['GET'])
|
||||||
|
@require_session_login
|
||||||
def receipt():
|
def receipt():
|
||||||
if not current_user.is_authenticated():
|
if not current_user.is_authenticated():
|
||||||
abort(401)
|
abort(401)
|
||||||
|
|
Reference in a new issue