check user is ccpo for request approval page
This commit is contained in:
@@ -4,6 +4,7 @@ from flask import current_app as app
|
||||
from . import requests_bp
|
||||
from atst.domain.requests import Requests
|
||||
from atst.domain.exceptions import NotFoundError
|
||||
from atst.domain.authz import Authorization
|
||||
|
||||
|
||||
def task_order_dictionary(task_order):
|
||||
@@ -17,11 +18,18 @@ def task_order_dictionary(task_order):
|
||||
@requests_bp.route("/requests/approval/<string:request_id>", methods=["GET"])
|
||||
def approval(request_id):
|
||||
request = Requests.get(g.current_user, request_id)
|
||||
Authorization.check_can_approve_request(g.current_user)
|
||||
|
||||
data = request.body
|
||||
if request.task_order:
|
||||
data["task_order"] = task_order_dictionary(request.task_order)
|
||||
|
||||
return render_template("requests/approval.html", data=data, request_id=request.id, financial_review=True)
|
||||
return render_template(
|
||||
"requests/approval.html",
|
||||
data=data,
|
||||
request_id=request.id,
|
||||
financial_review=True,
|
||||
)
|
||||
|
||||
|
||||
@requests_bp.route("/requests/task_order_download/<string:request_id>", methods=["GET"])
|
||||
|
Reference in New Issue
Block a user