def matchmaker_matches(institute_id, case_name):
    """Show all MatchMaker matches for a given case"""
    # check that only authorized users can access MME patients matches
    user_obj = store.user(current_user.email)
    if 'mme_submitter' not in user_obj['roles']:
        flash('unauthorized request', 'warning')
        return redirect(request.referrer)
    # Required params for getting matches from MME server:
    mme_base_url = current_app.config.get('MME_URL')
    mme_token = current_app.config.get('MME_TOKEN')
    if not mme_base_url or not mme_token:
        flash('An error occurred reading matchmaker connection parameters. Please check config file!', 'danger')
        return redirect(request.referrer)
    institute_obj, case_obj = institute_and_case(store, institute_id, case_name)
    data = controllers.mme_matches(case_obj, institute_obj, mme_base_url, mme_token)
    if data and data.get('server_errors'):
        flash('MatchMaker server returned error:{}'.format(data['server_errors']), 'danger')
        return redirect(request.referrer)
    elif not data:
        data = {
            'institute' : institute_obj,
            'case' : case_obj
        }
    return data
Show all MatchMaker matches for a given case