vincbeck commented on code in PR #34786:
URL: https://github.com/apache/airflow/pull/34786#discussion_r1347954018


##########
airflow/www/auth.py:
##########
@@ -44,6 +46,25 @@ def get_access_denied_message():
     return conf.get("webserver", "access_denied_message")
 
 
+def has_access(permissions: Sequence[tuple[str, str]] | None = None) -> 
Callable[[T], T]:
+    """
+    Factory for decorator that checks current user's permissions against 
required permissions.
+
+    Deprecated. Do not use this decorator, use one of the decorator 
`has_access_cluster_*` defined in
+    airflow/www/auth.py instead.
+
+    This decorator is widely used in user plugins, do not remove it. See
+    https://github.com/apache/airflow/pull/33213#discussion_r1346287224
+    """
+    warnings.warn(
+        "The 'has_access' decorator is deprecated. Please use one of the 
decorator `has_access_cluster_*`"
+        "defined in airflow/www/auth.py instead.",
+        DeprecationWarning,

Review Comment:
   Good point



-- 
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-unsubscr...@airflow.apache.org

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

Reply via email to