You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "vincbeck (via GitHub)" <gi...@apache.org> on 2023/08/15 15:15:28 UTC
[GitHub] [airflow] vincbeck commented on a diff in pull request #33213: Implement `is_authorized()` in auth manager
vincbeck commented on code in PR #33213:
URL: https://github.com/apache/airflow/pull/33213#discussion_r1294744724
##########
airflow/auth/managers/base_auth_manager.py:
##########
@@ -54,6 +58,67 @@ def get_user_id(self) -> str:
def is_logged_in(self) -> bool:
"""Return whether the user is logged in."""
+ @abstractmethod
+ def is_authorized(
+ self,
+ action: ResourceAction,
+ resource_type: str,
Review Comment:
I agree with you. But the resource types are defined as constants and not as enum in Airflow currently. See here: https://github.com/apache/airflow/blob/main/airflow/security/permissions.py#L20. It might be worth to revisit that and convert this list of constants to enum but I think it should be done in a separate PR
--
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