Reject invalid optional access callbacks

This commit is contained in:
Angel Capetillo Zavala
2026-11-13 18:19:39 -06:00
parent 1d8cd264b8
commit 10f0c59975
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ def cutoff_arg(args):
def patient_access():
check = current_app.config.get('CAMA_COHORT_ACCESS')
if callable(check) and not check(request):
if check is not None and (not callable(check) or not check(request)):
raise SelectionError('Acceso no autorizado', 403)