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 1e704526742 Fix `sync-perm` CLI command (#47626)
1e704526742 is described below
commit 1e704526742352ad10f6b0a25b1af424a4cc0ca9
Author: Vincent <[email protected]>
AuthorDate: Wed Mar 12 15:04:53 2025 -0400
Fix `sync-perm` CLI command (#47626)
---
.../src/airflow/providers/fab/auth_manager/security_manager/override.py | 2 ++
1 file changed, 2 insertions(+)
diff --git
a/providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py
b/providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py
index 26a3e08e880..ea008af120a 100644
---
a/providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py
+++
b/providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py
@@ -1117,6 +1117,8 @@ class
FabAirflowSecurityManagerOverride(AirflowSecurityManagerV2):
action = self.create_permission(action_name, resource_name)
if self.auth_role_admin not in self.builtin_roles:
admin_role = self.find_role(self.auth_role_admin)
+ if not admin_role:
+ admin_role = self.add_role(self.auth_role_admin)
self.add_permission_to_role(admin_role, action)
else:
# Permissions on this view exist but....