mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 07:24:52 +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
@@ -23,6 +23,16 @@ impl.events[api.events.on_server_startup] = function()
|
||||
game.disable_replay()
|
||||
end
|
||||
|
||||
impl.events[defines.events.on_player_joined_game] = function(event)
|
||||
local player = game.players[event.player_index]
|
||||
api.send_json("player_event", { type = "join", name = player.name })
|
||||
end
|
||||
|
||||
impl.events[defines.events.on_player_left_game] = function(event)
|
||||
local player = game.players[event.player_index]
|
||||
api.send_json("player_event", { type = "leave", name = player.name })
|
||||
end
|
||||
|
||||
-- Internal API
|
||||
clusterio_private = {}
|
||||
function clusterio_private.update_instance(new_id, new_name)
|
||||
|
||||
Reference in new issue
Block a user