fix(appstore): show reason why limit app to groups is not possible

Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
Ferdinand Thiessen 2026-05-13 17:58:51 +02:00
parent 63680bdce5
commit cfb0903cfb
No known key found for this signature in database
GPG key ID: 7E849AE05218500F

View file

@ -18,6 +18,7 @@ import BadgeAppLevel from '../BadgeAppLevel.vue'
import BadgeAppScore from '../BadgeAppScore.vue'
import { useLimitedGroups } from '../../composables/useLimitedGroups.ts'
import { useAppsStore } from '../../store/apps.ts'
import { canLimitToGroups } from '../../utils/appStatus.ts'
const { app } = defineProps<{ app: IAppstoreApp | IAppstoreExApp }>()
@ -98,6 +99,10 @@ const appCategories = computed(() => {
.join(', ')
})
const cannotLimitToGroups = computed(() => {
return app.active && !canLimitToGroups(app)
})
/**
* Get the author name from the XML node
*
@ -138,6 +143,10 @@ function authorName(xmlNode): string {
</ul>
</NcNoteCard>
<NcNoteCard v-if="cannotLimitToGroups" type="info">
{{ t('appstore', 'This app cannot be limited to groups because it provides functionality that is executed before group membership is determined.') }}
</NcNoteCard>
<div v-if="groupsAppIsLimitedTo.length" :class="$style.appstoreDetailsTab__section">
<h4 :id="idLimitedToGroups">
{{ t('appstore', 'Limited to groups') }}