From 63a656cd61d98f0ebff0a03e40086ffe864d6b8e Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Sun, 8 Nov 2020 21:24:31 +0100 Subject: [PATCH] Rename default Admin role to Cluster Admin Clarify the purpose and distinquesh the Admin role a bit better from the in-game admin status by renaming the role to Cluster Admin. --- docs/how-it-works.md | 2 +- docs/managing-a-cluster.md | 2 +- packages/lib/users.js | 2 +- test/integration/clusterio.js | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/how-it-works.md b/docs/how-it-works.md index ad4084b0..e5bc2e2a 100644 --- a/docs/how-it-works.md +++ b/docs/how-it-works.md @@ -27,4 +27,4 @@ that log into instances under its control. These accounts are used to store per player data and authorize management of the cluster. By default users accounts are assigned a Player role that gives a limited read access to the cluster resources, and admins of the cluster can be -assigned an Admin role to get access to manage it. +assigned a Cluster Admin role to get access to manage it. diff --git a/docs/managing-a-cluster.md b/docs/managing-a-cluster.md index ef58dbf0..4940356f 100644 --- a/docs/managing-a-cluster.md +++ b/docs/managing-a-cluster.md @@ -107,7 +107,7 @@ Replaces the roles the user has in the cluster with a new list of roles. Calling with an empty roles argument will remove all roles from the user. -By default there's a roled named Admin which grants access to +By default there's a roled named Cluster Admin which grants access to everything and a role named Player which grants a limited read access to the cluster, see [the section on roles](#roles) for more information about setting up roles and permissions. diff --git a/packages/lib/users.js b/packages/lib/users.js index 865572d1..803fe8be 100644 --- a/packages/lib/users.js +++ b/packages/lib/users.js @@ -102,7 +102,7 @@ class Role { function ensureDefaultAdminRole(roles) { let admin = roles.get(0); if (!admin) { - admin = new Role({ id: 0, name: "Admin", description: "Cluster wide administrator." }); + admin = new Role({ id: 0, name: "Cluster Admin", description: "Cluster wide administrator." }); roles.set(0, admin); } admin.permissions.add("core.admin"); diff --git a/test/integration/clusterio.js b/test/integration/clusterio.js index e9d80333..50ec1a33 100644 --- a/test/integration/clusterio.js +++ b/test/integration/clusterio.js @@ -312,7 +312,7 @@ describe("Integration of Clusterio", function() { describe("user set-roles", function() { it("should set the roles on the user", async function() { - await execCtl("user set-roles temp Admin"); + await execCtl('user set-roles temp "Cluster Admin"'); let result = await libLink.messages.listUsers.send(getControl()); let tempUser = result.list.find(user => user.name === "temp"); assert.deepEqual(tempUser.roles, [0]);