-
Notifications
You must be signed in to change notification settings - Fork 8
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
MD files not locked? #76
Comments
I also encounter this issue where any file that's shared with someone, even though locked by the owner, the other person is able to acces and edit the file. Nextcloud Hub II (23.0.5) |
Text files seem to not be locked, although they actually are:
If you check the downloaded file its contents will be Original, as saving the file was prevented by the lock. However, if you open again the file with the text editor the contents will be Modified. Moreover, if you share the file to another user and open the file as that other user the editor contents will also be Modified, but if the file is downloaded again the contents will be Original. Why?, you may ask. To be able to provide collaborative edition the editor keeps a list of changes done to the file since the last saving and applies them when the editor is opened. If I am not mistaken this is why the editor shows Modified, while the actual file contents are still Original. To make things more interesting, if the owner of the share opens the text file again with the editor then the changes will be applied by the text editor of that user, and as that user is the one who has the lock the file will be successfully saved with the changes done by the other users. In Nextcloud 24 locking was implemented for the text editor, so if another user opens a locked file a warning is shown and the file is opened in read only mode, thus preventing the scenario described above. That required changes in both the Text and Temporary files lock apps, and unfortunately it is very unlikely that it will be backported to any version before Nextcloud 24. If you need the fix you will need to backport it yourself (not recommended) or upgrade to Nextcloud 24 (recommended). |
Version: 20.1.0
NC: 22.2.8
Scenario:
Two users where User 1 has shared a folder with User 2.
User 2 creates a text document (.md) in the shared folder and Locks it.
User 1 is able to edit the document.
It is the same result if User 1 creates a file in the folder. User 2 is able to edit the document.
We have installed Only Office and if we use Only Office documents it works.
The text was updated successfully, but these errors were encountered: