From ebbf314e6fbac4462eda75541b882a86d66f33bd Mon Sep 17 00:00:00 2001 From: Chaoscaot Date: Tue, 6 Aug 2024 18:19:17 +0200 Subject: [PATCH] Fix SteamWar user in Teamlist --- src/de/steamwar/sql/SteamwarUser.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/de/steamwar/sql/SteamwarUser.java b/src/de/steamwar/sql/SteamwarUser.java index 2e5e3a8..e5d98a4 100644 --- a/src/de/steamwar/sql/SteamwarUser.java +++ b/src/de/steamwar/sql/SteamwarUser.java @@ -61,7 +61,7 @@ public class SteamwarUser { private static final SelectStatement byName = table.selectFields("UserName"); private static final SelectStatement byDiscord = table.selectFields("DiscordId"); private static final SelectStatement byTeam = table.selectFields("Team"); - private static final SelectStatement getServerTeam = new SelectStatement<>(table, "SELECT * FROM UserData WHERE UserGroup != 'Member' AND UserGroup != 'YouTuber'"); + private static final SelectStatement getUsersWithPerm = new SelectStatement<>(table, "SELECT S.* FROM UserData S JOIN UserPerm P ON S.id = P.User WHERE P.Perm = ?"); private static final SelectStatement getAll = new SelectStatement<>(table, "SELECT * FROM UserData"); private static final Statement updateName = table.update(Table.PRIMARY, "UserName"); @@ -112,8 +112,8 @@ public class SteamwarUser { } } - public static List getServerTeam() { - return getServerTeam.listSelect(); + public static List getUsersWithPerm(UserPerm perm) { + return getUsersWithPerm.listSelect(perm); } public static List getTeam(int teamId) {