"""Retain dev's optional access callback; no new authentication policy.""" from flask import current_app, jsonify, request def configured_access(): check = current_app.config.get('CAMA_COHORT_ACCESS') if check is not None and (not callable(check) or not check(request)): return jsonify(error='Acceso no autorizado'), 403