stephen-bracken commented on code in PR #70783:
URL: https://github.com/apache/airflow/pull/70783#discussion_r3684484497
##########
providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py:
##########
@@ -366,11 +366,18 @@ def build_public_user(self, *, session: Session =
NEW_SESSION) -> AnonymousUser
def get_fastapi_middlewares(self) -> list[tuple[_MiddlewareFactory[Any],
dict[str, Any]]]:
"""Register the FAB public-access middleware when public access is
configured."""
- if not self._get_auth_role_public():
- return []
- from airflow.providers.fab.auth_manager.middleware import
FabAuthRolePublicMiddleware
+ # Backwards compatible fix for
BaseAuthManager.get_fastapi_middlewares()
+ if hasattr(super(), "get_fastapi_middlewares"):
Review Comment:
This is to provide backwards compatibility, it can be removed in later
versions
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]