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

jedcunningham pushed a commit to branch v2-4-test
in repository https://gitbox.apache.org/repos/asf/airflow.git

commit 493ddb2ea9b49b36e8bb79414c8ed705f952a006
Author: Daniel Standish <[email protected]>
AuthorDate: Thu Sep 22 22:05:53 2022 -0700

    No missing user warning for public admin (#26611)
    
    If airflow has been configured such that public role is admin, there's no 
need to add users, so we shouldn't warn if there are none.
    
    (cherry picked from commit f01eed6490acd3bb3a58824e7388c4c3cd50ae29)
---
 airflow/www/fab_security/manager.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/airflow/www/fab_security/manager.py 
b/airflow/www/fab_security/manager.py
index 6fd65f2e4d..91d2a44b88 100644
--- a/airflow/www/fab_security/manager.py
+++ b/airflow/www/fab_security/manager.py
@@ -820,7 +820,7 @@ class BaseSecurityManager:
         if self.auth_role_admin not in self.builtin_roles:
             self.add_role(self.auth_role_admin)
         self.add_role(self.auth_role_public)
-        if self.count_users() == 0:
+        if self.count_users() == 0 and self.auth_role_public != 
self.auth_role_admin:
             log.warning(LOGMSG_WAR_SEC_NO_USER)
 
     def reset_password(self, userid, password):

Reply via email to