You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jedcunningham (via GitHub)" <gi...@apache.org> on 2025/01/21 23:20:26 UTC

Re: [PR] Deprecate methods `is_logged_in`, `get_user` and `get_url_logout` from base auth manager [airflow]

jedcunningham commented on code in PR #45862:
URL: https://github.com/apache/airflow/pull/45862#discussion_r1924478097


##########
airflow/auth/managers/base_auth_manager.py:
##########
@@ -121,17 +126,25 @@ def get_user_id(self) -> str | None:
             return str(user_id)
         return None
 
-    @abstractmethod
+    @deprecated(
+        reason="Only used in Airflow 2 legacy UI. Will be deleted soon.",
+        category=RemovedInAirflow3Warning,
+    )
     def is_logged_in(self) -> bool:
         """Return whether the user is logged in."""
+        raise NotImplementedError()
 
     @abstractmethod
     def get_url_login(self, **kwargs) -> str:
         """Return the login page url."""
 
-    @abstractmethod
+    @deprecated(
+        reason="Only used in Airflow 2 legacy UI. Will be deleted soon.",

Review Comment:
   We aren't going to support a logout url in AF3?



##########
airflow/auth/managers/base_auth_manager.py:
##########
@@ -90,18 +91,22 @@ def get_user_display_name(self) -> str:
         """Return the user's display name associated to the user in session."""
         return self.get_user_name()
 
-    @abstractmethod
+    @deprecated(

Review Comment:
   Hmm, feels weird to deprecate this but `get_user_name` and `get_user_display_name` aren't? I know you are targeting abstactmethods, but still.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org