give access decorator override function a clearer name; exception -> override

This commit is contained in:
dandds
2019-03-28 09:32:51 -04:00
parent 09d6b5fb09
commit 29ec4a80af
6 changed files with 15 additions and 16 deletions

View File

@@ -265,7 +265,7 @@ def is_new_task_order(*_args, **kwargs):
@task_orders_bp.route("/portfolios/<portfolio_id>/task_orders/new/<int:screen>")
@user_can(
Permissions.CREATE_TASK_ORDER,
exception=is_new_task_order,
override=is_new_task_order,
message="view new task order form",
)
def new(screen, task_order_id=None, portfolio_id=None):
@@ -316,7 +316,7 @@ def new(screen, task_order_id=None, portfolio_id=None):
)
@user_can(
Permissions.CREATE_TASK_ORDER,
exception=is_new_task_order,
override=is_new_task_order,
message="update task order",
)
def update(screen, task_order_id=None, portfolio_id=None):

View File

@@ -29,7 +29,7 @@ def wrap_check_is_ko(user, task_order_id=None, **_kwargs):
@task_orders_bp.route("/task_orders/<task_order_id>/digital_signature", methods=["GET"])
@user_can(
None, exception=wrap_check_is_ko, message="view contracting officer signature page"
None, override=wrap_check_is_ko, message="view contracting officer signature page"
)
def signature_requested(task_order_id):
task_order = find_unsigned_ko_to(task_order_id)
@@ -46,7 +46,7 @@ def signature_requested(task_order_id):
"/task_orders/<task_order_id>/digital_signature", methods=["POST"]
)
@user_can(
None, exception=wrap_check_is_ko, message="submit contracting officer signature"
None, override=wrap_check_is_ko, message="submit contracting officer signature"
)
def record_signature(task_order_id):
task_order = find_unsigned_ko_to(task_order_id)