-
Notifications
You must be signed in to change notification settings - Fork 159
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: context fallback to user instead of undefined #7437
Conversation
Interesting unit test failure in That happens because
now returns true in this test. I think it's fine to just update the snapshots... ... but opening files like this without contextRoute breaks the AppTopBar! We need to adjust the TopBar to not show/disable the close button (and explain that) or make it work somehow for example by defaulting the close to navigating to |
8a4ddff
to
17da585
Compare
I've changed the implementation to not use the Regarding the close action I've added a default of redirecting to |
Some issues remain with shares loading in the file details panel. At least it looks weird to me. Will have a look tomorrow morning. |
df5fa23
to
0d079ed
Compare
👍🏻
Hehe, yeah, I care about apps 🤓 Good fix! |
if (this.file.type === 'file' && isUserContext(this.$router, this.$route)) { | ||
calls.push(this.loadVersions({ client: this.$client, fileId: this.file.id })) | ||
try { | ||
await Promise.allSettled([ |
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.
Why allSettled? Can the catch block be entered at all 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.
hm true, probably not...
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.
Running into a major scope creep... reverting that change and following up in a separate PR.
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.
👍🏻
0d079ed
to
2f9507f
Compare
If we don't return within the detected context other contexts would get resolve attempts as well.
SonarCloud Quality Gate failed. |
Description
We've fixed a bug where routes without explicit
auth
requirement (i.e. user context) and without any context route in the URL were recognized as neither user-context nor public-link-context. In such situations we now expect that the session requires a user and redirect to the login page (instead of staying stuck on a most likely broken page).Motivation / context
We want to provide an endpoint in
ocis
that let's e.g. the desktop client query a URL for opening a document (via app provider / external app) in web. The desktop client has the file id and the app provider is capable of determining a default app if no app name is provided. But neither the desktop client nor the ocis backend know what route the file might have come from if opened via files app. Opening a file in web from the desktop client is always supposed to open in an authenticated session / user session (user needs to log in if not already done before).Types of changes
Checklist: