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

Inconsistent readonly status detection on RTC and after file status changes #15040

Open
krassowski opened this issue Aug 29, 2023 · 1 comment

Comments

@krassowski
Copy link
Member

Description

#14600 implements a read-only indicator (see #7980 for design discussion) which works well when opening a read-only file:

Screenshot from 2023-08-29 21-10-04

There are two situations when this does not work:

  • (a) when file was opened as read + write but was later changed to read-only
  • (b) when on RTC

Reproduce

With RTC:

  • open jupyterlab, create notebook, close it
  • run chmod 444 notebook.ipynb
  • open the notebook, change, save
  • see error in log console on status bar

Without RTC:

  • open jupyterlab, create notebook
  • run chmod 444 notebook.ipynb
  • change, save
  • see error dialog
File write access restricted after opening RTC
Screenshot from 2023-08-29 20-56-43 Screenshot from 2023-08-29 21-04-27

Expected behaviour

The save behaviour is consistent between these situations:

  • content model gets a proper writable flag on RTC
  • change of file permission status is propagated from server to frontend to modelStateChanged signal

Context

  • JupyterLab version: main at 4.1
@krassowski krassowski added bug tag:Real Time Collaboration status:Needs Triage Applied to new issues that need triage labels Aug 29, 2023
@krassowski
Copy link
Member Author

Note: in our codebase, there are both context.model.readOnly and context.contentsModel.writable but they are not documented and it is not clear how these differ. This duplication could contribute to the problem.

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