def METHOD_NAME(app):
    app.config.update(
        RQ_DASHBOARD_REDIS_URL=[
            "redis://:%s@%s:%s/%s"
            % (
                app.config.get("FLEXMEASURES_REDIS_PASSWORD", ""),
                app.config.get("FLEXMEASURES_REDIS_URL", ""),
                app.config.get("FLEXMEASURES_REDIS_PORT", ""),
                app.config.get("FLEXMEASURES_REDIS_DB_NR", ""),
            ),
            # it is possible to add additional rq instances to this list
        ]
    )
    @login_required
    def basic_auth():
        """Ensure basic authorization."""
        return
    @login_required
    @roles_accepted(ADMIN_ROLE)
    def basic_admin_auth():
        """Ensure basic admin authorization."""
        return
    # Logged in users can view queues on the demo server, but only admins can view them on other servers
    if app.config.get("FLEXMEASURES_MODE", "") == "demo":
        rq_dashboard.blueprint.before_request(basic_auth)
    else:
        rq_dashboard.blueprint.before_request(basic_admin_auth)
    # Todo: rq dashboard has no way of passing FlexMeasures template variables, so how to conditionally disable menu items?
    app.register_blueprint(rq_dashboard.blueprint, url_prefix="/tasks")