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;
|
|
|
|
}
|
2018-11-08 15:30:16 +03:00
|
|
|
|
2018-10-05 11:25:12 +03:00
|
|
|
public ClientPermissions(long data) {
|
2018-11-08 15:30:16 +03:00
|
|
|
canAdmin = (data & (1)) != 0;
|
2018-10-05 11:25:12 +03:00
|
|
|
canServer = (data & (1 << 1)) != 0;
|
|
|
|
}
|
2018-11-08 15:30:16 +03:00
|
|
|
|
|
|
|
public static ClientPermissions getSuperuserAccount() {
|
2018-10-05 11:36:50 +03:00
|
|
|
ClientPermissions perm = new ClientPermissions();
|
|
|
|
perm.canServer = true;
|
|
|
|
perm.canAdmin = true;
|
|
|
|
return perm;
|
|
|
|
}
|
2018-10-01 13:08:16 +03:00
|
|
|
}
|