This is an automated email from the ASF dual-hosted git repository.

vincbeck pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 0b79a477680 Remove `is_in_fab` in FAB auth manager (#47465)
0b79a477680 is described below

commit 0b79a477680d865cd0badce3705523460055e5a1
Author: Vincent <[email protected]>
AuthorDate: Thu Mar 6 15:42:48 2025 -0500

    Remove `is_in_fab` in FAB auth manager (#47465)
---
 .../providers/fab/auth_manager/fab_auth_manager.py       | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)

diff --git 
a/providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py 
b/providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py
index eb3ef724ab6..88d41b08915 100644
--- a/providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py
+++ b/providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py
@@ -144,12 +144,6 @@ class FabAuthManager(BaseAuthManager[User]):
 
     appbuilder: AirflowAppBuilder | None = None
 
-    is_in_fab: bool = False
-    """
-    Whether the instance is run in FAB or Fastapi.
-    Can be deleted once the Airflow 2 legacy UI is removed.
-    """
-
     def init(self) -> None:
         """Run operations when Airflow is initializing."""
         if self.appbuilder:
@@ -414,15 +408,7 @@ class FabAuthManager(BaseAuthManager[User]):
 
     def get_url_login(self, **kwargs) -> str:
         """Return the login page url."""
-        if self.is_in_fab:
-            if not self.security_manager.auth_view:
-                raise AirflowException("`auth_view` not defined in the 
security manager.")
-            if next_url := kwargs.get("next_url"):
-                return 
url_for(f"{self.security_manager.auth_view.endpoint}.login", next=next_url)
-            else:
-                return 
url_for(f"{self.security_manager.auth_view.endpoint}.login")
-        else:
-            return f"{self.apiserver_endpoint}/auth/login"
+        return f"{self.apiserver_endpoint}/auth/login"
 
     def get_url_logout(self):
         """Return the logout page url."""

Reply via email to