vincbeck commented on code in PR #34786:
URL: https://github.com/apache/airflow/pull/34786#discussion_r1352939249
##########
airflow/www/auth.py:
##########
@@ -44,6 +46,27 @@ 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_*`"
Review Comment:
Oh yeah, you're right. Nice catch!
--
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]