From 619186da13da1fcf0dd323fd3bf28753d737a0f8 Mon Sep 17 00:00:00 2001 From: chisom chima Date: Wed, 27 Mar 2024 11:45:26 +0100 Subject: [PATCH 1/2] feat: add a default notice box based on access level of the user in GroupDetails page chore: fix lint error chore: fix lint error --- i18n/en.pot | 7 +++++-- src/pages/GroupDetails/GroupDetails.js | 6 ++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index 2329c81c8..446d226d4 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2024-01-19T12:15:17.744Z\n" -"PO-Revision-Date: 2024-01-19T12:15:17.744Z\n" +"POT-Creation-Date: 2024-03-27T09:03:25.496Z\n" +"PO-Revision-Date: 2024-03-27T09:03:25.496Z\n" msgid "Yes" msgstr "Yes" @@ -704,6 +704,9 @@ msgstr "There was an error fetching this user." msgid "Edit user" msgstr "Edit user" +msgid "You do not have access to edit this user group" +msgstr "You do not have access to edit this user group" + msgid "Overview" msgstr "Overview" diff --git a/src/pages/GroupDetails/GroupDetails.js b/src/pages/GroupDetails/GroupDetails.js index d64822ec3..dc3ae4e44 100644 --- a/src/pages/GroupDetails/GroupDetails.js +++ b/src/pages/GroupDetails/GroupDetails.js @@ -34,6 +34,12 @@ const GroupDetails = ({ groupId }) => { return (
+ {group.access.read && ( + + {i18n.t('You do not have access to edit this user group')} + + )} +
Date: Tue, 7 May 2024 08:44:12 +0100 Subject: [PATCH 2/2] feat: update notice box display logic --- src/pages/GroupDetails/GroupDetails.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/GroupDetails/GroupDetails.js b/src/pages/GroupDetails/GroupDetails.js index dc3ae4e44..b0f827be2 100644 --- a/src/pages/GroupDetails/GroupDetails.js +++ b/src/pages/GroupDetails/GroupDetails.js @@ -34,7 +34,7 @@ const GroupDetails = ({ groupId }) => { return (
- {group.access.read && ( + {!group?.access?.write && ( {i18n.t('You do not have access to edit this user group')}