fix(common): subfolder add-new in team collections respects write access (#6243)
This commit is contained in:
parent
50f16e2ab5
commit
aee017ced3
2 changed files with 16 additions and 5 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue