@@ -26,6 +26,7 @@ The game server needs to have a user with a role that has:
26
26
- Read / Write access to the ` gamenotifications ` collection (` ["insert", "find", "remove"] ` )
27
27
- Read / Write access to the ` locks ` collection (` ["insert", "find", "remove", "update"] ` )
28
28
- Read access to the ` gameinfos ` collection, to load the game engines (` ["find"] ` )
29
+ - Write access to the ` apierrors ` colletion (` ["insert"] ` )
29
30
30
31
Due to mongoose (they should use ` {authorizedCollections: true, nameOnly: true} ` ), this is also needed
31
32
@@ -35,6 +36,7 @@ For exemaple, in db shell:
35
36
36
37
```
37
38
db.createRole({role: "game-server", privileges: [
39
+ {resource: {db: "gaia-project", collection: "apierrors"}, actions: ["insert"]},
38
40
{resource: {db: "gaia-project", collection: "chatmessages"}, actions: ["insert"]},
39
41
{resource: {db: "gaia-project", collection: "gameinfos"}, actions: ["find"]},
40
42
{resource: {db: "gaia-project", collection: "gamenotifications"}, actions: ["insert", "find", "remove", "update"]},
@@ -43,6 +45,20 @@ db.createRole({role: "game-server", privileges: [
43
45
{resource: {db: "gaia-project", collection: ""}, actions: ["listCollections"]}
44
46
], roles: []});
45
47
48
+ // or
49
+
50
+ db.updateRole("game-server", {privileges: [
51
+ {resource: {db: "gaia-project", collection: "apierrors"}, actions: ["insert"]},
52
+ {resource: {db: "gaia-project", collection: "chatmessages"}, actions: ["insert"]},
53
+ {resource: {db: "gaia-project", collection: "gameinfos"}, actions: ["find"]},
54
+ {resource: {db: "gaia-project", collection: "gamenotifications"}, actions: ["insert", "find", "remove", "update"]},
55
+ {resource: {db: "gaia-project", collection: "games"}, actions: ["find", "update"]},
56
+ {resource: {db: "gaia-project", collection: "locks"}, actions: ["insert", "find", "remove", "update"]},
57
+ {resource: {db: "gaia-project", collection: ""}, actions: ["listCollections"]}
58
+ ], roles: []});
59
+
60
+ // and
61
+
46
62
db.createUser({
47
63
user: "<name>",
48
64
pwd: passwordPrompt(), // Or "<cleartext password>"
0 commit comments