Skip to content

Commit

Permalink
Fix upload-only public links
Browse files Browse the repository at this point in the history
  • Loading branch information
kulmann committed Jun 7, 2022
1 parent b5086eb commit 68dff96
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 9 deletions.
1 change: 0 additions & 1 deletion packages/web-app-files/src/mixins/accessibleBreadcrumb.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ export default {
document.getElementById('files-breadcrumb').children[0].children
)
const activeBreadcrumbItem = activeBreadcrumb.getElementsByTagName('button')[0]

if (!activeBreadcrumbItem) {
return
}
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-files/src/search/sdk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,6 @@ export default class Provider extends EventBus implements SearchProvider {
}

public get available(): boolean {
return this.store.getters.capabilities.dav.reports.includes('search-files')
return this.store.getters.capabilities?.dav?.reports?.includes('search-files')
}
}
1 change: 1 addition & 0 deletions packages/web-app-files/src/views/FilesDrop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export default {
)
return
}
console.error(error)
this.errorMessage = error
})
.finally(() => {
Expand Down
16 changes: 9 additions & 7 deletions packages/web-app-files/src/views/PublicLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,17 @@ export default {
.then((files) => {
this.passwordRequired = false
this.setPublicLinkPassword(password)
const publicOperationName =
files[0].getProperty(this.$client.publicFiles.PUBLIC_LINK_PERMISSION) === '4'
? 'files-public-drop'
: 'files-public-files'
let publicOperationName = 'files-public-files'
let publicOperationParams = { item: this.$route.params.token }
if (files[0].getProperty(this.$client.publicFiles.PUBLIC_LINK_PERMISSION) === '4') {
publicOperationName = 'files-public-drop'
publicOperationParams = { token: this.$route.params.token }
}
this.$router.push(
createLocationPublic(publicOperationName, {
params: {
item: this.$route.params.token
}
params: publicOperationParams
})
)
})
Expand All @@ -130,6 +131,7 @@ export default {
this.$refs.passwordInput.focus()
})
} else {
console.error(error)
this.errorMessage = error
}
})
Expand Down
4 changes: 4 additions & 0 deletions packages/web-app-search/src/portals/SearchBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ export default {
},
mounted() {
if (!this.availableProviders.length) {
return
}
const input = this.$el.getElementsByTagName('input')[0]
const routeTerm = get(this, '$route.query.term')
Expand Down

0 comments on commit 68dff96

Please sign in to comment.