Skip to content
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

Read-only mode for shared documents #12960

Open
davidbrochart opened this issue Aug 18, 2022 · 0 comments
Open

Read-only mode for shared documents #12960

davidbrochart opened this issue Aug 18, 2022 · 0 comments

Comments

@davidbrochart
Copy link
Contributor

Problem

I think that we will soon need a read-only mode for showing documents, especially in the case of RTC.
With authorization coming to jupyter-server, protecting the PUT /api/contents/{path} endpoint with a contents:read permission could work: a user could change a document, but they would not be able to save it.
In RTC however, this becomes impracticle. Indeed, this endpoint is not used anymore, because saving a document happens inside the YDocWebSocketHandler, and this handler is needed even for loading a document. What users see is not only themselves editing a document, but also everybody else. So the ability to edit a document should be addressed a its source, in the frond-end.

Proposed Solution

It looks like CodeMirror 5 has a readOnly option. Maybe this is already possible using JupyterLab settings?

Additional context

See jupyter-server/jupyter_server#948.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants