Launcher/LaunchServer/src/main/java/ru/gravit/launchserver/auth/ClientPermissions.java

24 lines
643 B
Java
Raw Normal View History

2018-10-01 13:08:16 +03:00
package ru.gravit.launchserver.auth;
public class ClientPermissions {
public static final ClientPermissions DEFAULT = new ClientPermissions();
public boolean canAdmin;
public boolean canServer;
public ClientPermissions() {
canAdmin = false;
canServer = false;
}
public ClientPermissions(long data) {
2018-11-08 15:28:31 +03:00
canAdmin = (data & (1)) != 0;
canServer = (data & (1 << 1)) != 0;
}
public static ClientPermissions getSuperuserAccount()
{
ClientPermissions perm = new ClientPermissions();
perm.canServer = true;
perm.canAdmin = true;
return perm;
}
2018-10-01 13:08:16 +03:00
}