Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[full-ci] enable capability loading for password protected public links #6471

Merged
merged 2 commits into from
Mar 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Load capabilities for password protected public links

We've enabled capability loading for password protected public links.

https://github.com/owncloud/web/pull/6471
https://github.com/owncloud/web/issues/5863
17 changes: 7 additions & 10 deletions packages/web-app-files/src/views/PublicFiles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ import MixinMountSideBar from '../mixins/sidebar/mountSideBar'
import { VisibilityObserver } from 'web-pkg/src/observer'
import { ImageDimension, ImageType } from '../constants'
import debounce from 'lodash-es/debounce'
import merge from 'lodash-es/merge'
import omit from 'lodash-es/omit'
import { buildResource } from '../helpers/resources'
import { bus } from 'web-pkg/src/instance'
import { useTask } from 'vue-concurrency'
Expand Down Expand Up @@ -96,22 +96,19 @@ const unauthenticatedUserReady = async (router, store) => {
const publicToken = (router.currentRoute.params.item || '').split('/')[0]
const publicLinkPassword = store.getters['Files/publicLinkPassword']

if (publicLinkPassword) {
return
}

await store.dispatch('loadCapabilities', {
publicToken,
...(publicLinkPassword && { user: 'public', password: publicLinkPassword })
})

// ocis at the moment is not able to create archives for public links that are password protected
// till this is supported by the backend remove it hard as a workaround
kulmann marked this conversation as resolved.
Show resolved Hide resolved
// https://github.com/owncloud/web/issues/6515
if (publicLinkPassword) {
store.commit(
'SET_CAPABILITIES',
merge({}, store.getters.capabilities, { files: { archivers: null } })
)
store.commit('SET_CAPABILITIES', {
capabilities: omit(store.getters.capabilities, ['files.archivers']),
version: store.getters.version
})
}

store.commit('SET_USER_READY', true)
Expand Down Expand Up @@ -197,7 +194,7 @@ export default {
}
}

// this is a workAround till we have a real bootProcess
// this is a workAround till we have extended the bootProcess
// if a visitor is able to view the current page
// the user is ready and the TOO LATE provisioning can start.
// there is no other way at the moment to find out if:
Expand Down