diff --git a/client/src/components/History/CurrentHistory/HistoryMessages.vue b/client/src/components/History/CurrentHistory/HistoryMessages.vue index 3d97f80dd24a..ab5b6c1180cc 100644 --- a/client/src/components/History/CurrentHistory/HistoryMessages.vue +++ b/client/src/components/History/CurrentHistory/HistoryMessages.vue @@ -5,13 +5,14 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome"; import { BAlert } from "bootstrap-vue"; import { computed, ref } from "vue"; -import type { HistorySummary } from "@/api"; +import { type GenericUser, type HistorySummary, userOwnsHistory } from "@/api"; import localize from "@/utils/localization"; library.add(faArchive, faBurn, faTrash); interface Props { history: HistorySummary; + currentUser: GenericUser | null; } const props = defineProps(); @@ -21,10 +22,14 @@ const userOverQuota = ref(false); const hasMessages = computed(() => { return userOverQuota.value || props.history.deleted || props.history.archived; }); + +const currentUserOwnsHistory = computed(() => { + return userOwnsHistory(props.currentUser, props.history); +});