Skip to content

Commit

Permalink
Add default permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
memetrollsXD authored and Melledy committed Apr 27, 2022
1 parent fef0f2a commit 5904474
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/emu/grasscutter/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public static class DispatchServerOptions {
public Boolean FrontHTTPS = true;

public boolean AutomaticallyCreateAccounts = false;
public String[] defaultPermissions = new String[] { "" };

public RegionInfo[] GameServers = {};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,10 @@ public void start() throws Exception {
// 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();
Expand Down

0 comments on commit 5904474

Please sign in to comment.