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:
Hornwitser committed 2020-06-15 16:47:15 +02:00
1 parent 2acf57d23d
commit cf6f2cb70a
20 files changed
+1511 -153

No files matched your search

+10
View File
@@ -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)