diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java index 5e43c476..c71cf184 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerConfig.java @@ -74,7 +74,6 @@ public AuthProviderPair getAuthProviderPair() { public ExeConf launch4j; public NettyConfig netty; - public String whitelistRejectString; public LauncherConf launcher; public CertificateConf certificate; public JarSignerConf sign; @@ -282,7 +281,6 @@ public static LaunchServerConfig getDefault(LaunchServer.LaunchServerEnv env) { newConfig.auth.put("std", a); newConfig.protectHandler = new StdProtectHandler(); newConfig.binaryName = "Launcher"; - newConfig.whitelistRejectString = "Вас нет в белом списке"; newConfig.netty = new NettyConfig(); newConfig.netty.fileServerEnabled = true; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java index fb5c731c..f2454f29 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/AuthResponse.java @@ -82,15 +82,6 @@ public void execute(ChannelHandlerContext ctx, Client clientData) throws Excepti AuthProvider.authError(String.format("Illegal result: '%s'", aresult.username)); return; } - Collection profiles = server.getProfiles(); - for (ClientProfile p : profiles) { - if (p.getTitle().equals(client)) { - if (!p.isWhitelistContains(login)) { - throw new AuthException(server.config.whitelistRejectString); - } - clientData.profile = p; - } - } //if (clientData.profile == null) { // throw new AuthException("You profile not found"); //} diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/SetProfileResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/SetProfileResponse.java index 5f4ce7b3..54111cac 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/SetProfileResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/auth/SetProfileResponse.java @@ -31,10 +31,6 @@ public void execute(ChannelHandlerContext ctx, Client client) { Collection profiles = server.getProfiles(); for (ClientProfile p : profiles) { if (p.getTitle().equals(this.client)) { - if (!p.isWhitelistContains(client.username)) { - sendError(server.config.whitelistRejectString); - return; - } client.profile = p; sendResult(new SetProfileRequestEvent(p)); return; diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateResponse.java b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateResponse.java index 9904f1d0..c3b4846b 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateResponse.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/socket/response/update/UpdateResponse.java @@ -24,15 +24,6 @@ public void execute(ChannelHandlerContext ctx, Client client) { sendError("Access denied"); return; } - if (!client.permissions.canAdmin) { - for (ClientProfile p : server.getProfiles()) { - if (!client.profile.getTitle().equals(p.getTitle())) continue; - if (!p.isWhitelistContains(client.username)) { - sendError("You don't download this folder"); - return; - } - } - } HashedDir dir = server.updatesDirMap.get(dirName); if (dir == null) { sendError(String.format("Directory %s not found", dirName)); diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java index 9f78774f..b954fab0 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/profiles/ClientProfile.java @@ -120,8 +120,6 @@ public enum ClassLoaderConfig private final Set updateOptional = new HashSet<>(); @LauncherNetworkAPI private boolean updateFastCheck; - @LauncherNetworkAPI - private boolean useWhitelist; // Client launcher @LauncherNetworkAPI private String mainClass; @@ -132,8 +130,6 @@ public enum ClassLoaderConfig @LauncherNetworkAPI private final List clientArgs = new ArrayList<>(); @LauncherNetworkAPI - private final List whitelist = new ArrayList<>(); - @LauncherNetworkAPI public SecurityManagerConfig securityManagerConfig = SecurityManagerConfig.CLIENT; @LauncherNetworkAPI public ClassLoaderConfig classLoaderConfig = ClassLoaderConfig.LAUNCHER; @@ -383,12 +379,6 @@ public boolean isUpdateFastCheck() { } - public boolean isWhitelistContains(String username) { - if (!useWhitelist) return true; - return whitelist.stream().anyMatch(profileCaseSensitive ? e -> e.equals(username) : e -> e.equalsIgnoreCase(username)); - } - - public void setTitle(String title) { this.title = title; }