houqp commented on a change in pull request #10594:
URL: https://github.com/apache/airflow/pull/10594#discussion_r481849731



##########
File path: airflow/api_connexion/security.py
##########
@@ -37,3 +37,32 @@ def decorated(*args, **kwargs):
         return function(*args, **kwargs)
 
     return cast(T, decorated)
+
+
+def requires_access(permissions: Sequence[Tuple[str, str]]) -> Callable[[T], 
T]:

Review comment:
       For endpoints that need to be guarded by authentication but not 
authorization, one solution we can adopt is to pass in an empty permissions 
list, or `None`, then in the decorator skip the role check entirely if that's 
the case.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to