Skip to content

Commit

Permalink
fix: file picker when embed delegate authentication is enabled
Browse files Browse the repository at this point in the history
Fixes the "Open" and "Save as" actions when the server has enabled `embed.delegateAuthentication`. This flag needs to be ignored for these 2 actions since Web is basically embedding itself and always needs authentication.
  • Loading branch information
Jannik Stehle committed Nov 13, 2024
1 parent b12a9a0 commit 747607b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: "Save as" / "Open" when embed delegate authentication is enabled

We've fixed the "Save as" / "Open" actions when embed delegate authentication is enabled on the server side.

https://github.com/owncloud/web/issues/11897
https://github.com/owncloud/web/pull/11899
1 change: 1 addition & 0 deletions packages/web-pkg/src/components/Modals/FilePickerModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export default defineComponent({
iframeUrl.searchParams.append('hide-logo', 'true')
iframeUrl.searchParams.append('embed', 'true')
iframeUrl.searchParams.append('embed-target', 'file')
iframeUrl.searchParams.append('embed-delegate-authentication', 'false')
iframeUrl.searchParams.append('embed-file-types', availableFileTypes.join(','))
const onLoad = () => {
Expand Down
1 change: 1 addition & 0 deletions packages/web-pkg/src/components/Modals/SaveAsModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ export default defineComponent({
iframeUrl.searchParams.append('embed', 'true')
iframeUrl.searchParams.append('embed-target', 'location')
iframeUrl.searchParams.append('embed-choose-file-name', 'true')
iframeUrl.searchParams.append('embed-delegate-authentication', 'false')
iframeUrl.searchParams.append('embed-choose-file-name-suggestion', props.originalResource.name)
const onLoad = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('FilePickerModal', () => {
it('sets the iframe src correctly', () => {
const { wrapper } = getWrapper()
expect(wrapper.vm.iframeSrc).toEqual(
'http://localhost:3000/files-spaces-generic?hide-logo=true&embed=true&embed-target=file&embed-file-types=text%2Cmd%2Ctext%2Frtf'
'http://localhost:3000/files-spaces-generic?hide-logo=true&embed=true&embed-target=file&embed-delegate-authentication=false&embed-file-types=text%2Cmd%2Ctext%2Frtf'
)
})
it('sets the iframe title correctly', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe('SaveAsModal', () => {
it('sets the iframe src correctly', () => {
const { wrapper } = getWrapper()
expect(wrapper.vm.iframeSrc).toEqual(
'http://localhost:3000/files-spaces-generic?hide-logo=true&embed=true&embed-target=location&embed-choose-file-name=true&embed-choose-file-name-suggestion=test.txt'
'http://localhost:3000/files-spaces-generic?hide-logo=true&embed=true&embed-target=location&embed-choose-file-name=true&embed-delegate-authentication=false&embed-choose-file-name-suggestion=test.txt'
)
})
it('sets the iframe title correctly', () => {
Expand Down

0 comments on commit 747607b

Please sign in to comment.