File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
src/components/NcRelatedResourcesPanel Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 6868<script >
6969import axios from ' @nextcloud/axios'
7070import { generateOcsUrl } from ' @nextcloud/router'
71+ import { getCapabilities } from ' @nextcloud/capabilities'
7172import AccountGroup from ' vue-material-design-icons/AccountGroup.vue'
7273import ChevronDown from ' vue-material-design-icons/ChevronDown.vue'
7374import ChevronUp from ' vue-material-design-icons/ChevronUp.vue'
@@ -77,6 +78,8 @@ import NcIconSvgWrapper from '../NcIconSvgWrapper/NcIconSvgWrapper.vue'
7778
7879import { t } from ' ../../l10n.js'
7980
81+ const teamResourceProviders = getCapabilities ()? .circles ? .teamResourcesProviders ?? []
82+
8083export default {
8184 name: ' NcTeamResources' ,
8285
@@ -158,6 +161,9 @@ export default {
158161 methods: {
159162 t,
160163 async fetchTeamResources () {
164+ if (! teamResourceProviders .includes (this .providerId )) {
165+ return
166+ }
161167 try {
162168 this .loading = true
163169 const response = await axios .get (generateOcsUrl (` /teams/resources/${ this .providerId } /${ this .itemId } ` ))
You can’t perform that action at this time.
0 commit comments