-
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
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
try { | ||
if (props.isReadOnly && viewMode === 'write') { |
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.
would it make sense to create an enum for the viewMode since its used at multiple locations?
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.
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. 0 Bugs 62.5% Coverage Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
* 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 |
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.
@dschmidt you forgot to delete it
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'll drop it in my 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.
doh 😂
* 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