mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FIX] ServerWrapper connect to ServerProfile
This commit is contained in:
parent
9841ef3157
commit
58dfc472ac
4 changed files with 7 additions and 4 deletions
|
@ -34,12 +34,12 @@ public void init(LaunchServer server) {
|
|||
|
||||
@Override
|
||||
public boolean canGetProfile(ClientProfile profile, Client client) {
|
||||
return client.isAuth && client.username != null && (!profile.isLimited() || isWhitelisted("launchserver.profile.%s.show", profile, client) );
|
||||
return !profile.isLimited() || isWhitelisted("launchserver.profile.%s.show", profile, client);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canChangeProfile(ClientProfile profile, Client client) {
|
||||
return client.isAuth && client.username != null && (!profile.isLimited() || isWhitelisted("launchserver.profile.%s.enter", profile, client) );
|
||||
return !profile.isLimited() || isWhitelisted("launchserver.profile.%s.enter", profile, client);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -85,7 +85,8 @@ public boolean accept(Client client, AuthProviderPair pair, String extendedToken
|
|||
client.auth_id = info.authId;
|
||||
client.auth = server.config.getAuthProviderPair(info.authId);
|
||||
if(client.permissions == null) client.permissions = new ClientPermissions();
|
||||
client.permissions.addAction("launchserver\\.checkserver");
|
||||
client.permissions.addAction("launchserver.checkserver");
|
||||
client.permissions.addAction(String.format("launchserver.profiles.%s.show", info.serverName));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,6 +31,8 @@ public class OptionalFile {
|
|||
public int subTreeLevel = 1;
|
||||
@LauncherNetworkAPI
|
||||
public boolean isPreset;
|
||||
@LauncherNetworkAPI
|
||||
public boolean limited;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
id 'org.openjfx.javafxplugin' version '0.0.10' apply false
|
||||
}
|
||||
group = 'pro.gravit.launcher'
|
||||
version = '5.2.2'
|
||||
version = '5.2.3-SNAPSHOT'
|
||||
|
||||
apply from: 'props.gradle'
|
||||
|
||||
|
|
Loading…
Reference in a new issue