You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by vi...@apache.org on 2023/08/11 15:12:04 UTC

[airflow] branch main updated: Move Actions, Resources and Permissions views (#33277)

This is an automated email from the ASF dual-hosted git repository.

vincbeck pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 39aee60b33 Move Actions, Resources and Permissions views (#33277)
39aee60b33 is described below

commit 39aee60b33a56eee706af084ed1c600b12a0dd57
Author: Raphaƫl Vandon <va...@amazon.com>
AuthorDate: Fri Aug 11 08:11:55 2023 -0700

    Move Actions, Resources and Permissions views (#33277)
---
 .../views.py => auth/managers/fab/views/permissions.py}        |  1 -
 airflow/www/security.py                                        | 10 +++++-----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/airflow/www/fab_security/views.py b/airflow/auth/managers/fab/views/permissions.py
similarity index 99%
rename from airflow/www/fab_security/views.py
rename to airflow/auth/managers/fab/views/permissions.py
index 94bfe01d05..57f9477ea1 100644
--- a/airflow/www/fab_security/views.py
+++ b/airflow/auth/managers/fab/views/permissions.py
@@ -1,4 +1,3 @@
-#
 # Licensed to the Apache Software Foundation (ASF) under one
 # or more contributor license agreements.  See the NOTICE file
 # distributed with this work for additional information
diff --git a/airflow/www/security.py b/airflow/www/security.py
index fee21dd9d4..d9efcec7cb 100644
--- a/airflow/www/security.py
+++ b/airflow/www/security.py
@@ -25,6 +25,11 @@ from sqlalchemy import or_
 from sqlalchemy.orm import Session, joinedload
 
 from airflow.auth.managers.fab.models import Permission, Resource, Role, User
+from airflow.auth.managers.fab.views.permissions import (
+    ActionModelView,
+    PermissionPairModelView,
+    ResourceModelView,
+)
 from airflow.auth.managers.fab.views.roles_list import CustomRoleModelView
 from airflow.auth.managers.fab.views.user import (
     CustomUserDBModelView,
@@ -46,11 +51,6 @@ from airflow.utils.log.logging_mixin import LoggingMixin
 from airflow.utils.session import NEW_SESSION, provide_session
 from airflow.www.extensions.init_auth_manager import get_auth_manager
 from airflow.www.fab_security.sqla.manager import SecurityManager
-from airflow.www.fab_security.views import (
-    ActionModelView,
-    PermissionPairModelView,
-    ResourceModelView,
-)
 from airflow.www.utils import CustomSQLAInterface
 
 EXISTING_ROLES = {