You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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 acontents: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.
The text was updated successfully, but these errors were encountered: