mirror of
https://github.com/Melledy/Grasscutter.git
synced 2024-11-23 09:11:45 +00:00
Add default permissions
This commit is contained in:
parent
f6db39926d
commit
0c665d940e
@ -33,6 +33,7 @@ public final class Config {
|
|||||||
public Boolean FrontHTTPS = true;
|
public Boolean FrontHTTPS = true;
|
||||||
|
|
||||||
public boolean AutomaticallyCreateAccounts = false;
|
public boolean AutomaticallyCreateAccounts = false;
|
||||||
|
public String[] defaultPermissions = new String[] { "" };
|
||||||
|
|
||||||
public RegionInfo[] GameServers = {};
|
public RegionInfo[] GameServers = {};
|
||||||
|
|
||||||
|
@ -339,6 +339,10 @@ public final class DispatchServer {
|
|||||||
// added.
|
// added.
|
||||||
account = DatabaseHelper.createAccountWithId(requestData.account, 0);
|
account = DatabaseHelper.createAccountWithId(requestData.account, 0);
|
||||||
|
|
||||||
|
for (String permission : Grasscutter.getConfig().getDispatchOptions().defaultPermissions) {
|
||||||
|
account.addPermission(permission);
|
||||||
|
}
|
||||||
|
|
||||||
if (account != null) {
|
if (account != null) {
|
||||||
responseData.message = "OK";
|
responseData.message = "OK";
|
||||||
responseData.data.account.uid = account.getId();
|
responseData.data.account.uid = account.getId();
|
||||||
|
Loading…
Reference in New Issue
Block a user