-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevents files that have been shared via secure view without having a compatible app to view such (or the file type is not supported) from being clicked.
- Loading branch information
Jannik Stehle
committed
Jul 4, 2024
1 parent
129f986
commit 7686e84
Showing
8 changed files
with
218 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Bugfix: Secure view default action | ||
|
||
Clicking files that have been shared via secure view without having a compatible app to view such (or the file type is not supported) is no longer possible. This prevents errors and other file actions from falsely registering themselves as default. | ||
|
||
https://github.com/owncloud/web/pull/11139 | ||
https://github.com/owncloud/web/issues/11138 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from './useCanBeOpenedWithSecureView' | ||
export * from './useGetResourceContext' | ||
export * from './useLoadFileInfoById' | ||
export * from './useResourceContents' |
13 changes: 13 additions & 0 deletions
13
packages/web-pkg/src/composables/resources/useCanBeOpenedWithSecureView.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { Resource } from '@ownclouders/web-client' | ||
import { useAppsStore } from '../piniaStores' | ||
|
||
export const useCanBeOpenedWithSecureView = () => { | ||
const appsStore = useAppsStore() | ||
|
||
const canBeOpenedWithSecureView = (resource: Resource) => { | ||
const secureViewExtensions = appsStore.fileExtensions.filter(({ secureView }) => secureView) | ||
return secureViewExtensions.some(({ mimeType }) => mimeType === resource.mimeType) | ||
} | ||
|
||
return { canBeOpenedWithSecureView } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.