PermissionsManager удален за ненадобностью

This commit is contained in:
Gravit 2018-12-26 19:51:40 +07:00
parent 40036362f9
commit c64d3b1f42
No known key found for this signature in database
GPG key ID: 061981E1E85D3216
3 changed files with 2 additions and 27 deletions

View file

@ -4,7 +4,6 @@
import ru.gravit.launcher.Launcher; import ru.gravit.launcher.Launcher;
import ru.gravit.launchserver.Reloadable; import ru.gravit.launchserver.Reloadable;
import ru.gravit.launchserver.auth.ClientPermissions; import ru.gravit.launchserver.auth.ClientPermissions;
import ru.gravit.launchserver.manangers.PermissionsManager;
import ru.gravit.utils.helper.IOHelper; import ru.gravit.utils.helper.IOHelper;
import ru.gravit.utils.helper.LogHelper; import ru.gravit.utils.helper.LogHelper;

View file

@ -1,7 +1,7 @@
package ru.gravit.launchserver.auth.provider; package ru.gravit.launchserver.auth.provider;
import ru.gravit.launchserver.LaunchServer;
import ru.gravit.launchserver.auth.ClientPermissions; import ru.gravit.launchserver.auth.ClientPermissions;
import ru.gravit.launchserver.manangers.PermissionsManager;
public class AuthProviderResult { public class AuthProviderResult {
@ -12,7 +12,7 @@ public class AuthProviderResult {
public AuthProviderResult(String username, String accessToken) { public AuthProviderResult(String username, String accessToken) {
this.username = username; this.username = username;
this.accessToken = accessToken; this.accessToken = accessToken;
permissions = PermissionsManager.getPermissions(username); permissions = LaunchServer.server.config.permissionsHandler.getPermissions(username);
} }
public AuthProviderResult(String username, String accessToken, ClientPermissions permissions) { public AuthProviderResult(String username, String accessToken, ClientPermissions permissions) {

View file

@ -1,24 +0,0 @@
package ru.gravit.launchserver.manangers;
import ru.gravit.launchserver.auth.ClientPermissions;
public class PermissionsManager {
private static PermissionsFunction function = PermissionsManager::returnDefault;
public static void registerPermissionsFunction(PermissionsFunction function)
{
PermissionsManager.function = function;
}
public static ClientPermissions getPermissions(String username)
{
return function.getPermission(username);
}
@FunctionalInterface
public interface PermissionsFunction
{
ClientPermissions getPermission(String username);
}
public static ClientPermissions returnDefault(String username)
{
return ClientPermissions.DEFAULT;
}
}