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 95cab23792 Bug fix: sync perm command not able to use custom security 
manager (#41020)
95cab23792 is described below

commit 95cab23792c80f0ecf980ac0a74b8d08431fb3bb
Author: Gopal Dirisala <[email protected]>
AuthorDate: Thu Jul 25 19:49:51 2024 +0530

    Bug fix: sync perm command not able to use custom security manager (#41020)
---
 airflow/providers/fab/auth_manager/cli_commands/utils.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/airflow/providers/fab/auth_manager/cli_commands/utils.py 
b/airflow/providers/fab/auth_manager/cli_commands/utils.py
index 8361aab51b..78403e2407 100644
--- a/airflow/providers/fab/auth_manager/cli_commands/utils.py
+++ b/airflow/providers/fab/auth_manager/cli_commands/utils.py
@@ -25,6 +25,7 @@ from typing import TYPE_CHECKING, Generator
 from flask import Flask
 
 import airflow
+from airflow.configuration import conf
 from airflow.www.extensions.init_appbuilder import init_appbuilder
 from airflow.www.extensions.init_views import init_plugins
 
@@ -44,5 +45,8 @@ def _return_appbuilder(app: Flask) -> AirflowAppBuilder:
 def get_application_builder() -> Generator[AirflowAppBuilder, None, None]:
     static_folder = os.path.join(os.path.dirname(airflow.__file__), "www", 
"static")
     flask_app = Flask(__name__, static_folder=static_folder)
+    webserver_config = conf.get_mandatory_value("webserver", "config_file")
     with flask_app.app_context():
+        # Enable customizations in webserver_config.py to be applied via 
Flask.current_app.
+        flask_app.config.from_pyfile(webserver_config, silent=True)
         yield _return_appbuilder(flask_app)

Reply via email to