Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
fix(common): subfolder add-new in team collections respects write access (#6243)
Nivedinaee017ced338
diff --git a/packages/hoppscotch-common/src/components/collections/TeamCollections.vue b/packages/hoppscotch-common/src/components/collections/TeamCollections.vueindex bd74b6795..3a56c3a27 100644--- a/packages/hoppscotch-common/src/components/collections/TeamCollections.vue+++ b/packages/hoppscotch-common/src/components/collections/TeamCollections.vue@@ -486,12 +486,16 @@:label="t('add.new')"filledoutline+ :disabled="hasNoTeamAccess"+ :title="hasNoTeamAccess ? t('team.no_access') : ''"@click="- node.data.type === 'collections' &&- emit('add-folder', {- path: node.id,- folder: node.data.data.data,- })+ hasNoTeamAccess+ ? null+ : node.data.type === 'collections' &&+ emit('add-folder', {+ path: node.id,+ folder: node.data.data.data,+ })"/></template>diff --git a/packages/hoppscotch-common/src/components/collections/index.vue b/packages/hoppscotch-common/src/components/collections/index.vueindex d850b3a25..9ef25a871 100644--- a/packages/hoppscotch-common/src/components/collections/index.vue+++ b/packages/hoppscotch-common/src/components/collections/index.vue@@ -1051,6 +1051,13 @@ const addFolder = (payload: {path: stringfolder: HoppCollection | TeamCollection}) => {+ if (+ collectionsType.value.type === "team-collections" &&+ !hasTeamWriteAccess.value+ ) {+ return+ }+const { path, folder } = payloadeditingFolder.value = foldereditingFolderPath.value = path