mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-23 00:51:01 +03:00
PermissionsManager удален за ненадобностью
This commit is contained in:
parent
40036362f9
commit
c64d3b1f42
3 changed files with 2 additions and 27 deletions
|
@ -4,7 +4,6 @@
|
|||
import ru.gravit.launcher.Launcher;
|
||||
import ru.gravit.launchserver.Reloadable;
|
||||
import ru.gravit.launchserver.auth.ClientPermissions;
|
||||
import ru.gravit.launchserver.manangers.PermissionsManager;
|
||||
import ru.gravit.utils.helper.IOHelper;
|
||||
import ru.gravit.utils.helper.LogHelper;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package ru.gravit.launchserver.auth.provider;
|
||||
|
||||
import ru.gravit.launchserver.LaunchServer;
|
||||
import ru.gravit.launchserver.auth.ClientPermissions;
|
||||
import ru.gravit.launchserver.manangers.PermissionsManager;
|
||||
|
||||
|
||||
public class AuthProviderResult {
|
||||
|
@ -12,7 +12,7 @@ public class AuthProviderResult {
|
|||
public AuthProviderResult(String username, String accessToken) {
|
||||
this.username = username;
|
||||
this.accessToken = accessToken;
|
||||
permissions = PermissionsManager.getPermissions(username);
|
||||
permissions = LaunchServer.server.config.permissionsHandler.getPermissions(username);
|
||||
}
|
||||
|
||||
public AuthProviderResult(String username, String accessToken, ClientPermissions permissions) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue