You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "uranusjr (via GitHub)" <gi...@apache.org> on 2023/09/06 06:24:34 UTC

[GitHub] [airflow] uranusjr commented on a diff in pull request #33213: Implement `is_authorized()` in auth manager

uranusjr commented on code in PR #33213:
URL: https://github.com/apache/airflow/pull/33213#discussion_r1316791815


##########
airflow/auth/managers/base_auth_manager.py:
##########
@@ -102,3 +154,8 @@ def security_manager(self, security_manager: AirflowSecurityManager):
         :param security_manager: the security manager
         """
         self._security_manager = security_manager
+
+    @staticmethod
+    def is_dag_resource(resource_type: ResourceType) -> bool:
+        """Determines if a resource relates to a DAG."""
+        return resource_type == ResourceType.DAG

Review Comment:
   What’s the use for this method?



##########
airflow/auth/managers/base_auth_manager.py:
##########
@@ -102,3 +154,8 @@ def security_manager(self, security_manager: AirflowSecurityManager):
         :param security_manager: the security manager
         """
         self._security_manager = security_manager
+
+    @staticmethod
+    def is_dag_resource(resource_type: ResourceType) -> bool:
+        """Determines if a resource relates to a DAG."""
+        return resource_type == ResourceType.DAG

Review Comment:
   What’s the use for this method?



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