mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-20 23:53:13 +09:00
Refactor User and Role into data classes (#531)
Use the JSON data class pattern for User, Role, and PlayerStats and move them into lib/src/data. This means that User is purely data now and can't reference role objects directly. To make it possible easily check permissions attached to roles and store data only visible on the controller on user objects a ControllerUser type is introduced which is linked with the UserManager and can therefore reference role objects directly. Resolves #525.
This commit is contained in:
1 parent
f802e6ba67
commit
e453a80155
37 files changed
+629
-613
No files matched your search
@@ -5,7 +5,7 @@
|
||||
import * as libHelpers from "./helpers";
|
||||
import type { Logger } from "./logging";
|
||||
import type { PluginConfigGroup } from "./config";
|
||||
import type PlayerStats from "./PlayerStats";
|
||||
import type { PlayerStats } from "./data";
|
||||
|
||||
// TODO Add proper typing for plugins
|
||||
/* Used to define the export of info.ts from plugins */
|
||||
|
||||
Reference in new issue
Block a user