Repository navigation
web-app-external: view mode - #9879
Conversation
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
92554e5 to
052a40b
Compare
|
Our product supports editing in a public link share. We must do this based on the share permissions |
This is not about forbidding it completely, it's just about opening files in shares/public links in read only mode by default - the user can then click edit and switch to edit mode given they have the permission to do edit the file |
|
Hmm i would expect only one smart open action which always uses the highest possible permission. |
|
Yeah, so config option to make it opt in. Why I pinged you tho: is Office365 as wopi app name fixed or is that configurable? |
|
Configurable in the app provider |
b083464 to
ea802d5
Compare
| const loadAppUrl = useTask(function* () { | ||
| const loadAppUrl = useTask(function* (signal, viewMode: string) { | ||
| try { | ||
| if (props.isReadOnly && viewMode === 'write') { |
There was a problem hiding this comment.
would it make sense to create an enum for the viewMode since its used at multiple locations?
There was a problem hiding this comment.
seems overkill to me tbh. In theory we could also support more modes which are defined by the backend... this is just some specific handling for an edge case
e2a6b61 to
05ed300
Compare
|
SonarCloud Quality Gate failed.
|
* web-app-external: open files in shares and public links in view mode by default * Simplify logic by not handling everything in a watcher * Show error popup when trying to switch to edit mode for read-only files * Simplify logic some more * Remove obsolete unref * Remove console output * Implement feature flag * run linter * test: fix unit tests * add config to dev docs * fixup! add config to dev docs --------- Co-authored-by: Jannik Stehle <[email protected]>
| return | ||
| } | ||
|
|
||
| debugger |
* web-app-external: open files in shares and public links in view mode by default * Simplify logic by not handling everything in a watcher * Show error popup when trying to switch to edit mode for read-only files * Simplify logic some more * Remove obsolete unref * Remove console output * Implement feature flag * run linter * test: fix unit tests * add config to dev docs * fixup! add config to dev docs --------- Co-authored-by: Jannik Stehle <[email protected]>











Description
Open non-personal files in "view" (readonly) mode when enabled via config:
editor.openAsPreview.Based on the logic implemented by CERN this currently is the case for all files in shares and public links.
Related Issue
Types of changes