Skip to content

Commit

Permalink
No missing user warning for public admin (#26611)
Browse files Browse the repository at this point in the history
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 f01eed6)
  • Loading branch information
dstandish authored and jedcunningham committed Sep 26, 2022
1 parent 1a38896 commit 493ddb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airflow/www/fab_security/manager.py
Expand Up @@ -820,7 +820,7 @@ def create_db(self):
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):
Expand Down

0 comments on commit 493ddb2

Please sign in to comment.