jmix-framework / jmix

Jmix framework
https://www.jmix.io
Apache License 2.0
488 stars 112 forks source link

User is able to edit unsaved document's versions #570

Open owlet1997 opened 2 years ago

owlet1997 commented 2 years ago

Environment: Jmix version: 1.0.999-SNAPSHOT Jmix Studio plugin version: 1.1.SNAPSHOT3517-212 IntelliJ version: IntelliJ IDEA 2021.2 (Ultimate Edition) OS: Windows 10 desktop app: LibreOffice v7.2.0, Microsoft Office 16 add-on version: 1.1.0-SNAPSHOT

TC:

  1. Create new project -> add add-on
  2. Add to app.properties:
    
    webdav.applications = {"vnd.libreoffice.command":{"name":"LibreOffice","protocols":{"writable":"vnd.libreoffice.command:ofe|u|","read_only":"vnd.libreoffice.command:ofv|u|"},"extensions":["odt", "ods", "odp", "doc", "docx", "xls", "xlsx", "ppt", "pptx"]}}

 -> run app
3. Open browser -> Open document browser
4. Upload any files
5. Select any file and click `Manage versions` OR click `v2` near filename
6. Select any file and click `Copy to head` OR upload new file
7. Click a link of unsaved document version
8. Authorize in desktop app
9. Click button for enabling editing

**AR:**
User is able to edit this file, there is no access error

**ER:**
user should not be able to edit file opened via link in the version's manager
![image](https://user-images.githubusercontent.com/45730069/133597877-62154dd6-0593-4a77-a00f-f77bef4bf73b.png)
glebshalyganov commented 2 years ago

@owlet1997 , could you please run this TestCase with the latest CUBA WebDAV and compare the behaviour? If it is the same, then the issue has lower priority.

owlet1997 commented 2 years ago

@glebshalyganov yes, the behaviour is the same

rusiaikinat commented 1 month ago

testing after #3270