Add default permissions

This commit is contained in:
memetrollsXD 2022-04-28 00:10:46 +02:00 committed by Melledy
parent fef0f2aff7
commit 59044743a4
2 changed files with 5 additions and 0 deletions

View File

@ -33,6 +33,7 @@ public final class Config {
public Boolean FrontHTTPS = true;
public boolean AutomaticallyCreateAccounts = false;
public String[] defaultPermissions = new String[] { "" };
public RegionInfo[] GameServers = {};

View File

@ -339,6 +339,10 @@ public final class DispatchServer {
// added.
account = DatabaseHelper.createAccountWithId(requestData.account, 0);
for (String permission : Grasscutter.getConfig().getDispatchOptions().defaultPermissions) {
account.addPermission(permission);
}
if (account != null) {
responseData.message = "OK";
responseData.data.account.uid = account.getId();