aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2024-07-30 02:33:35 +0100
committerGravatar Joe Banks <[email protected]>2024-07-30 02:33:35 +0100
commitba555560de7c48db74604a386345fef085d28fed (patch)
tree24d30d39d90c54867bab4d1b573e48a762e0f63e
parentI pushed unlinted code to main, I am sorry (diff)
Update filters in LDAP and GitHub Grafana team syncers
-rw-r--r--arthur/exts/grafana/github_team_sync.py2
-rw-r--r--arthur/exts/grafana/ldap_team_sync.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/arthur/exts/grafana/github_team_sync.py b/arthur/exts/grafana/github_team_sync.py
index 873c6c4..6e77a55 100644
--- a/arthur/exts/grafana/github_team_sync.py
+++ b/arthur/exts/grafana/github_team_sync.py
@@ -38,7 +38,7 @@ class GrafanaGitHubTeamSync(commands.Cog):
for grafana_user in all_grafana_users:
if grafana_user["login"] not in missing_members:
continue
- if grafana_user.get("auth_module") != "oauth_github":
+ if "GitHub" not in grafana_user.get("authLabels", []):
continue
await grafana.add_user_to_team(
diff --git a/arthur/exts/grafana/ldap_team_sync.py b/arthur/exts/grafana/ldap_team_sync.py
index bff0ef2..2d63099 100644
--- a/arthur/exts/grafana/ldap_team_sync.py
+++ b/arthur/exts/grafana/ldap_team_sync.py
@@ -47,7 +47,7 @@ class GrafanaLDAPTeamSync(commands.Cog):
for grafana_user in all_grafana_users:
if grafana_user["login"] not in missing_members:
continue
- if grafana_user.get("auth_module") != "ldap":
+ if "LDAP" not in grafana_user.get("authLabels", []):
continue
await grafana.add_user_to_team(