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.
Why allSettled? Can the catch block be entered at all then?
There was a problem hiding this comment.
hm true, probably not...
There was a problem hiding this comment.
Running into a major scope creep... reverting that change and following up in a separate PR.
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
authrequirement (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
ocisthat 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: