Skip to content

Commit d24162f

Browse files
authored
Merge pull request #60361 from nextcloud/fix/appstore-reasons
fix(appstore): show reason why limit app to groups is not possible
2 parents 9a00604 + c603178 commit d24162f

3 files changed

Lines changed: 32 additions & 23 deletions

File tree

apps/appstore/src/components/AppstoreSidebar/AppDetailsTab.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import BadgeAppLevel from '../BadgeAppLevel.vue'
1818
import BadgeAppScore from '../BadgeAppScore.vue'
1919
import { useLimitedGroups } from '../../composables/useLimitedGroups.ts'
2020
import { useAppsStore } from '../../store/apps.ts'
21+
import { canLimitToGroups } from '../../utils/appStatus.ts'
2122
2223
const { app } = defineProps<{ app: IAppstoreApp | IAppstoreExApp }>()
2324
@@ -98,6 +99,10 @@ const appCategories = computed(() => {
9899
.join(', ')
99100
})
100101
102+
const cannotLimitToGroups = computed(() => {
103+
return app.active && !canLimitToGroups(app)
104+
})
105+
101106
/**
102107
* Get the author name from the XML node
103108
*
@@ -138,6 +143,10 @@ function authorName(xmlNode): string {
138143
</ul>
139144
</NcNoteCard>
140145

146+
<NcNoteCard v-if="cannotLimitToGroups" type="info">
147+
{{ t('appstore', 'This app cannot be limited to groups because it provides functionality that is executed before group membership is determined.') }}
148+
</NcNoteCard>
149+
141150
<div v-if="groupsAppIsLimitedTo.length" :class="$style.appstoreDetailsTab__section">
142151
<h4 :id="idLimitedToGroups">
143152
{{ t('appstore', 'Limited to groups') }}

0 commit comments

Comments
 (0)