-
Notifications
You must be signed in to change notification settings - Fork 156
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
Conversation
1d3f873
to
fddde38
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change is okay, I'm just a bit confused, why the earlier version did not work ... :-\
It seems |
@@ -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) |
There was a problem hiding this comment.
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
? 🤔
There was a problem hiding this comment.
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...?
There was a problem hiding this comment.
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.
Kudos, SonarCloud Quality Gate passed! |
@@ -322,6 +322,7 @@ export const announceAuthService = ({ | |||
router: VueRouter | |||
}): void => { | |||
authService.initialize(configurationManager, clientService, store, router) | |||
vue.prototype.$authService = authService | |||
set(vue, '$authService', authService) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you can remove this line then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought so too, but it gives me: Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'initializeContext')
🤔 It's the same for $permissionManager
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What a mess. You're a hero!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
urgh... awesome 🤗
Description
We've fixed a bug where the password form on a public drop page would not show after setting a required password.
Related Issue
Types of changes