From 6c19b7200373fac5a14419a6350149db9338ff74 Mon Sep 17 00:00:00 2001 From: Jia Xu Date: Wed, 7 Feb 2024 12:38:11 -0800 Subject: [PATCH] 19673 - Create eft_staff role to access EFT shortname functionality (#1405) * add manage_eft role for accessing eft functionality * unit test fix * unit test fix --- pay-api/src/pay_api/resources/v1/eft_short_names.py | 8 ++++---- pay-api/src/pay_api/utils/enums.py | 1 + pay-api/tests/unit/api/test_eft_short_names.py | 8 ++++---- pay-api/tests/unit/api/test_eft_transactions.py | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pay-api/src/pay_api/resources/v1/eft_short_names.py b/pay-api/src/pay_api/resources/v1/eft_short_names.py index e4a9a13fa..b55416988 100644 --- a/pay-api/src/pay_api/resources/v1/eft_short_names.py +++ b/pay-api/src/pay_api/resources/v1/eft_short_names.py @@ -36,7 +36,7 @@ @bp.route('', methods=['GET', 'OPTIONS']) @cross_origin(origins='*', methods=['GET']) @_jwt.requires_auth -@_jwt.has_one_of_roles([Role.SYSTEM.value, Role.STAFF.value]) +@_jwt.has_one_of_roles([Role.SYSTEM.value, Role.MANAGE_EFT.value]) def get_eft_shortnames(): """Get all eft short name records.""" current_app.logger.info('', methods=['PATCH']) @cross_origin(origins='*') @_tracing.trace() -@_jwt.has_one_of_roles([Role.SYSTEM.value, Role.STAFF.value]) +@_jwt.has_one_of_roles([Role.SYSTEM.value, Role.MANAGE_EFT.value]) def patch_eft_shortname(short_name_id: int): """Update EFT short name mapping.""" current_app.logger.info('