mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 23:33:12 +09:00
Add user and permission system
Add users, roles and permissions and rework the authentication to use separate user and slave tokens for control and slave connections respectively. Add commands for listing permissions, roles and users, and creating, editing and deleting roles and users.
This commit is contained in:
1 parent
2acf57d23d
commit
cf6f2cb70a
20 files changed
+1511
-153
No files matched your search
@@ -156,6 +156,14 @@ class Instance extends link.Link{
|
||||
console.error("Error handling autosave-finished:", err);
|
||||
});
|
||||
});
|
||||
|
||||
this.server.on("ipc-player_event", event => {
|
||||
link.messages.playerEvent.send(this, {
|
||||
instance_id: this.config.get("instance.id"),
|
||||
...event,
|
||||
});
|
||||
plugin.invokeHook(this.plugins, "onPlayerEvent", event);
|
||||
});
|
||||
}
|
||||
|
||||
async _autosave(name) {
|
||||
@@ -1181,10 +1189,10 @@ async function startSlave() {
|
||||
if (slaveConfig.get("slave.master_token") === "enter token here") {
|
||||
console.error("ERROR invalid config!");
|
||||
console.error(
|
||||
"Master server now needs an access token for write operations. As clusterio\n"+
|
||||
"Master server requires an access token for socket operations. As clusterio\n"+
|
||||
"slaves depends upon this, please set your token using the command node slave\n"+
|
||||
"config set slave.master_token <token>. You can retrieve your auth token from\n"+
|
||||
"the master in secret-api-token.txt after running it once."
|
||||
"config set slave.master_token <token>. You can generate an auth token using\n"+
|
||||
"using node clusterctl generate-slave-token."
|
||||
);
|
||||
process.exitCode = 1;
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user