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

Fix missing password form on public drop page #8007

Merged
merged 2 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions changelog/unreleased/bugfix-missing-public-password-form
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Missing password form on public drop page

We've fixed a bug where the password form on a public drop page would not show after setting a required password.

https://github.com/owncloud/web/pull/8007
https://github.com/owncloud/web/issues/7670
3 changes: 2 additions & 1 deletion packages/web-app-files/src/views/FilesDrop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import { usePublicLinkPassword, useStore } from 'web-pkg/src/composables'
import { eventBus } from 'web-pkg/src/services/eventBus'
import { linkRoleUploaderFolder } from 'web-client/src/helpers/share'
import { defineComponent } from '@vue/composition-api'
import { authService } from 'web-runtime/src/services/auth'

export default defineComponent({
components: {
Expand Down Expand Up @@ -151,7 +152,7 @@ export default defineComponent({
.catch((error) => {
// likely missing password, redirect to public link password prompt
if (error.statusCode === 401) {
return this.$authService.handleAuthError(this.$router.currentRoute)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the authService not available anymore as this.$authService? 🤔

Copy link
Contributor Author

@JammingBen JammingBen Nov 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #8007 (comment). I'm down to undo the change and rather fix it in announceAuthService, but I'm not sure why it's not working...?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working with prototype seems to be the right way though: https://v2.vuejs.org/v2/cookbook/adding-instance-properties.html. I'll add it.

return authService.handleAuthError(this.$router.currentRoute)
}
console.error(error)
this.errorMessage = error
Expand Down