fix(common): subfolder add-new in team collections respects write access (#6243)

This commit is contained in:
Nivedin 2026-04-29 14:15:49 +05:30 committed by GitHub
parent 50f16e2ab5
commit aee017ced3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 16 additions and 5 deletions

View file

@ -486,12 +486,16 @@
:label="t('add.new')"
filled
outline
: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>

View file

@ -1051,6 +1051,13 @@ const addFolder = (payload: {
path: string
folder: HoppCollection | TeamCollection
}) => {
if (
collectionsType.value.type === "team-collections" &&
!hasTeamWriteAccess.value
) {
return
}
const { path, folder } = payload
editingFolder.value = folder
editingFolderPath.value = path