From 3157e5c05776c37a93105c5338c054f324ebe229 Mon Sep 17 00:00:00 2001 From: Johnnynator Date: Sat, 10 Oct 2026 21:25:50 +0200 Subject: [PATCH] Add Manage Moderator Permissions --- Manage-Moderator-Permissions.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 Manage-Moderator-Permissions.md diff --git a/Manage-Moderator-Permissions.md b/Manage-Moderator-Permissions.md new file mode 100644 index 0000000..8c0768d --- /dev/null +++ b/Manage-Moderator-Permissions.md @@ -0,0 +1,32 @@ +The game has one built-in Admin role called `root` which has all permission, all other roles have to be configured. +The admin role of a user is configured in the `accounts` collection by the field `admRole` of each accounts document. + +Following permissions can be set: +- `play` +- `playInMaintenance` +- `playClosedPTR` +- `playFreeSpace` +- `mute` +- `mutePermanent` +- `ban` +- `banPermanent` +- `gmView` +- `observeGames` +- `giveFreeSpace` +- `propertyEdit` +- `promoControl` +- `adminView` +- `adminEdit` +- `privilegesControl` +- `roleAssignment` + +By default, this configuration is read from a document in the collection `admRoles` within the database `web_adm`. +E.g. you could create the roles `moderator` and `gm` like this: +```js +db.admRoles.updateOne({}, { $set: { + "roles.moderator": { play: NumberInt(1), mute: NumberInt(1), ban: NumberInt(1), gmView: NumberInt(1) }, + "roles.gm": { play: NumberInt(1), playInMaintenance: NumberInt(1), mute: NumberInt(1), + mutePermanent: NumberInt(1), ban: NumberInt(1), banPermanent: NumberInt(1), + gmView: NumberInt(1), observeGames: NumberInt(1), adminView: NumberInt(1) } +}}, { upsert: true }) +``` \ No newline at end of file