From be54f8c82768f6e4b36eb889ab19cdbfed0dba79 Mon Sep 17 00:00:00 2001 From: Troels Ugilt Jensen <6103205+tuj@users.noreply.github.com> Date: Mon, 25 Mar 2024 09:12:42 +0100 Subject: [PATCH] 969: Added roles to users list --- CHANGELOG.md | 2 ++ src/components/users/user-columns.jsx | 6 ++++++ src/translations/da/common.json | 13 ++++++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e705d68..bb2f3837 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] +- [#235](https://github.com/os2display/display-admin-client/pull/235) + - Added roles to users list. - [#233](https://github.com/os2display/display-admin-client/pull/233) - Fixed issue when clicking media archive element when media archive is not in multiple mode. - [#232](https://github.com/os2display/display-admin-client/pull/232) diff --git a/src/components/users/user-columns.jsx b/src/components/users/user-columns.jsx index cd516c2e..10ac5ae6 100644 --- a/src/components/users/user-columns.jsx +++ b/src/components/users/user-columns.jsx @@ -16,6 +16,12 @@ function getUserColumns() { path: "fullName", label: t("columns.full-name"), }, + { + path: "roles", + label: t("columns.roles"), + dataFunction: (roles) => + roles.map((role) => t(`roles.${role}`)).join(", "), + }, { path: "userType", label: t("columns.user-type"), diff --git a/src/translations/da/common.json b/src/translations/da/common.json index 8b8d433b..fdf61f50 100644 --- a/src/translations/da/common.json +++ b/src/translations/da/common.json @@ -91,7 +91,18 @@ "activated": "Aktiv", "full-name": "Navn", "created-at": "Oprettelsesdato", - "user-type": "Brugertype" + "user-type": "Brugertype", + "roles": "Roller" + }, + "roles": { + "ROLE_USER": "Bruger", + "ROLE_SCREEN": "Skærm", + "ROLE_EDITOR": "Redaktør", + "ROLE_EXTERNAL_USER": "Ekstern bruger", + "ROLE_EXTERNAL_USER_ADMIN": "Ekstern brugeradministrator", + "ROLE_USER_ADMIN": "Brugeradministrator", + "ROLE_ADMIN": "Administrator", + "ROLE_SUPER_ADMIN": "Superadministrator" }, "loading-messages": { "loading-users": "Henter brugere",