Skip to content

Commit 0b9a540

Browse files
dstandishjedcunningham
authored andcommitted
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 f01eed6)
1 parent 4ae13d9 commit 0b9a540

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

airflow/www/fab_security/manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,7 @@ def create_db(self):
820820
if self.auth_role_admin not in self.builtin_roles:
821821
self.add_role(self.auth_role_admin)
822822
self.add_role(self.auth_role_public)
823-
if self.count_users() == 0:
823+
if self.count_users() == 0 and self.auth_role_public != self.auth_role_admin:
824824
log.warning(LOGMSG_WAR_SEC_NO_USER)
825825

826826
def reset_password(self, userid, password):

0 commit comments

Comments
 (0)