Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add a default notice box based on access level of the user #1364

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"

Expand Down
6 changes: 6 additions & 0 deletions src/pages/GroupDetails/GroupDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ const GroupDetails = ({ groupId }) => {

return (
<Details title={group.displayName}>
{!group?.access?.write && (
<NoticeBox warn>
{i18n.t('You do not have access to edit this user group')}
</NoticeBox>
)}
<br />
<Section
title={i18n.t('Overview')}
action={
Expand Down
Loading