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

potiuk 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 b1cdab39f8 Add back `get_url_for_login` in security manager (#33660)
b1cdab39f8 is described below

commit b1cdab39f85879f2b0189685c0b7f7dcdc8d62f0
Author: Vincent <[email protected]>
AuthorDate: Wed Aug 23 12:17:30 2023 -0400

    Add back `get_url_for_login` in security manager (#33660)
    
    * Add back `get_url_for_login` in security manager
    
    * Rename FAB_SECURITY_MANAGER_CLASS to SECURITY_MANAGER_CLASS
---
 airflow/www/extensions/init_appbuilder.py  | 4 ++++
 docs/apache-airflow/security/webserver.rst | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/airflow/www/extensions/init_appbuilder.py 
b/airflow/www/extensions/init_appbuilder.py
index 9c2948e324..bbc6343fcf 100644
--- a/airflow/www/extensions/init_appbuilder.py
+++ b/airflow/www/extensions/init_appbuilder.py
@@ -586,6 +586,10 @@ class AirflowAppBuilder:
     def get_url_for_login_with(self, next_url: str | None = None) -> str:
         return get_auth_manager().get_url_login(next_url=next_url)
 
+    @property
+    def get_url_for_login(self):
+        return get_auth_manager().get_url_login()
+
     @property
     def get_url_for_index(self):
         return 
url_for(f"{self.indexview.endpoint}.{self.indexview.default_view}")
diff --git a/docs/apache-airflow/security/webserver.rst 
b/docs/apache-airflow/security/webserver.rst
index 2862f7073a..9e4c947ee7 100644
--- a/docs/apache-airflow/security/webserver.rst
+++ b/docs/apache-airflow/security/webserver.rst
@@ -176,7 +176,7 @@ Here is an example of what you might have in your 
webserver_config.py:
     AUTH_ROLES_SYNC_AT_LOGIN = True  # Checks roles on every login
     AUTH_USER_REGISTRATION = True  # allow users who are not already in the 
FAB DB to register
     # Make sure to replace this with the path to your security manager class
-    FAB_SECURITY_MANAGER_CLASS = "your_module.your_security_manager_class"
+    SECURITY_MANAGER_CLASS = "your_module.your_security_manager_class"
     AUTH_ROLES_MAPPING = {
         "Viewer": ["Viewer"],
         "Admin": ["Admin"],

Reply via email to