diff --git a/app/components/EventListItem.tsx b/app/components/EventListItem.tsx index f6d9cd877..12c91ffda 100644 --- a/app/components/EventListItem.tsx +++ b/app/components/EventListItem.tsx @@ -14,6 +14,7 @@ import Event from "~/models/Event"; import Avatar from "~/components/Avatar"; import Item, { Actions } from "~/components/List/Item"; import Time from "~/components/Time"; +import useStores from "~/hooks/useStores"; import RevisionMenu from "~/menus/RevisionMenu"; import { documentHistoryUrl } from "~/utils/routeHelpers"; @@ -25,6 +26,8 @@ type Props = { const EventListItem = ({ event, latest, document }: Props) => { const { t } = useTranslation(); + const { policies } = useStores(); + const can = policies.abilities(document.id); const opts = { userName: event.actor.name, }; @@ -87,7 +90,7 @@ const EventListItem = ({ event, latest, document }: Props) => { { } actions={ - isRevision && event.modelId ? ( + isRevision && event.modelId && can.update ? ( ) : undefined } diff --git a/shared/i18n/locales/en_US/translation.json b/shared/i18n/locales/en_US/translation.json index 0f176305c..87d6bccbd 100644 --- a/shared/i18n/locales/en_US/translation.json +++ b/shared/i18n/locales/en_US/translation.json @@ -312,9 +312,9 @@ "Exporting": "Exporting", "Export Collection": "Export Collection", "Collections are for grouping your documents. They work best when organized around a topic or internal team — Product or Engineering for example.": "Collections are for grouping your documents. They work best when organized around a topic or internal team — Product or Engineering for example.", - "This is the default level of access given to team members, you can give specific users or groups more access once the collection is created.": "This is the default level of access given to team members, you can give specific users or groups more access once the collection is created.", + "This is the default level of access, you can give individual users or groups more access once the collection is created.": "This is the default level of access, you can give individual users or groups more access once the collection is created.", "Public document sharing": "Public document sharing", - "When enabled, documents can be shared publicly on the internet.": "When enabled, documents can be shared publicly on the internet.", + "When enabled any documents within this collection can be shared publicly on the internet.": "When enabled any documents within this collection can be shared publicly on the internet.", "Creating": "Creating", "Create": "Create", "{{ groupName }} was added to the collection": "{{ groupName }} was added to the collection", @@ -350,6 +350,7 @@ "The {{ collectionName }} collection is private. Team members have no access to it by default.": "The {{ collectionName }} collection is private. Team members have no access to it by default.", "Team members can view documents in the {{ collectionName }} collection by default.": "Team members can view documents in the {{ collectionName }} collection by default.", "Team members can view and edit documents in the {{ collectionName }} collection by\n default.": "Team members can view and edit documents in the {{ collectionName }} collection by\n default.", + "When enabled, documents can be shared publicly on the internet.": "When enabled, documents can be shared publicly on the internet.", "Public sharing is currently disabled in the team security settings.": "Public sharing is currently disabled in the team security settings.", "Additional access": "Additional access", "Add groups": "Add groups",