Add Manage Moderator Permissions
@@ -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 })
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user