Fix SteamWar user in Teamlist

Dieser Commit ist enthalten in:
Chaoscaot 2024-08-06 18:19:17 +02:00
Ursprung d93b846c1f
Commit ebbf314e6f

Datei anzeigen

@ -61,7 +61,7 @@ public class SteamwarUser {
private static final SelectStatement<SteamwarUser> byName = table.selectFields("UserName"); private static final SelectStatement<SteamwarUser> byName = table.selectFields("UserName");
private static final SelectStatement<SteamwarUser> byDiscord = table.selectFields("DiscordId"); private static final SelectStatement<SteamwarUser> byDiscord = table.selectFields("DiscordId");
private static final SelectStatement<SteamwarUser> byTeam = table.selectFields("Team"); private static final SelectStatement<SteamwarUser> byTeam = table.selectFields("Team");
private static final SelectStatement<SteamwarUser> getServerTeam = new SelectStatement<>(table, "SELECT * FROM UserData WHERE UserGroup != 'Member' AND UserGroup != 'YouTuber'"); private static final SelectStatement<SteamwarUser> getUsersWithPerm = new SelectStatement<>(table, "SELECT S.* FROM UserData S JOIN UserPerm P ON S.id = P.User WHERE P.Perm = ?");
private static final SelectStatement<SteamwarUser> getAll = new SelectStatement<>(table, "SELECT * FROM UserData"); private static final SelectStatement<SteamwarUser> getAll = new SelectStatement<>(table, "SELECT * FROM UserData");
private static final Statement updateName = table.update(Table.PRIMARY, "UserName"); private static final Statement updateName = table.update(Table.PRIMARY, "UserName");
@ -112,8 +112,8 @@ public class SteamwarUser {
} }
} }
public static List<SteamwarUser> getServerTeam() { public static List<SteamwarUser> getUsersWithPerm(UserPerm perm) {
return getServerTeam.listSelect(); return getUsersWithPerm.listSelect(perm);
} }
public static List<SteamwarUser> getTeam(int teamId) { public static List<SteamwarUser> getTeam(int teamId) {