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

can edit files with view access in Collabora and Onlyoffice #8060

Closed
nirajacharya2 opened this issue Dec 22, 2023 · 10 comments
Closed

can edit files with view access in Collabora and Onlyoffice #8060

nirajacharya2 opened this issue Dec 22, 2023 · 10 comments
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug Type:Regression
Milestone

Comments

@nirajacharya2
Copy link
Contributor

Describe the bug

when a user shares a file (.ods, .odp, docx, xlsx, pptx) with view permission

Steps to reproduce

  1. run ocis with Collabora and Onlyoffice services
  2. create a file (.ods, .odp, docx, xlsx, pptx) as admin
  3. share it to marie with edit permission
  4. open the file and don't close it as marie
  5. change the permission to view as admin
  6. make some edits and close it as marie
  7. close the file as marie
  8. open the file again as marie can still edit it with view permission

Expected behavior

marie should not be able to edit the file

Actual behavior

marie can still edit it with view permission

Setup

Please describe how you started the server and provide a list of relevant environment variables or configuration files.

running ocis from web repos docker-compose file

OCIS_IMAGE=owncloud/ocis:5.0.0-beta.2 docker compose up traefik ocis wopiserver ocis-appprovider-onlyoffice onlyoffice ocis-appprovider-collabora collabora

ownCloud Web UI 8.0.0-beta.2
Infinite Scale 5.0.0-beta.2 Community 

Additional context

Add any other context about the problem here.

@nirajacharya2 nirajacharya2 mentioned this issue Dec 22, 2023
71 tasks
@saw-jan saw-jan changed the title can edit files with view access in Collabora and Onlyoffice ms can edit files with view access in Collabora and Onlyoffice Dec 22, 2023
@ScharfViktor
Copy link
Contributor

ScharfViktor commented Dec 22, 2023

can confirm it:

Actual:
admin changed role of the locked file and:

  • got a message on the web that everything is fine - web issue
  • but in the response <statuscode>996</statuscode><message>grpc update share request failed<message/> - correct
  • permission is changed for admin (after refreshing page) - backend issue. should not be changed. Expect- edit permissions
  • permission for recipient is not changed (still edit) - correct
Screen.Recording.2023-12-22.at.12.23.00.mov

@ScharfViktor
Copy link
Contributor

ScharfViktor commented Dec 27, 2023

@micbar
Copy link
Contributor

micbar commented Dec 28, 2023

same issue: https://github.com/orgs/owncloud/projects/338

Copy&Paste error?

@ScharfViktor
Copy link
Contributor

Copy&Paste error?

yes. I changed my comment. thanks

@2403905
Copy link
Contributor

2403905 commented Jan 4, 2024

@ScharfViktor FYI
v4.0.5, v5.0.0-rc.1
The public links don't have an issue if the behavior below is expected:

  1. user A created file.odt and created a public link with an edit permissions
  2. user B opens the link.
  3. user A changed permission to view -> no errors in a response, code 100
  4. user B can edit a file until closes it.
  5. after reopen the file, user B can't edit.

@dragonchaser dragonchaser added the Priority:p2-high Escalation, on top of current planning, release blocker label Jan 15, 2024
@dragonchaser dragonchaser moved this from Qualification to Prio 2 in Infinite Scale Team Board Jan 15, 2024
@2403905
Copy link
Contributor

2403905 commented Jan 17, 2024

After the share has already updated the update the grant is failed because the file is locked.
https://github.com/cs3org/reva/blob/bde86a38bd77917251a8bc97da5a1bd1dc4c85f2/pkg/storage/utils/decomposedfs/grants.go#L313
We can try to roll back the updateShare before returning an error or try to check locks before the updateShare.

The similar issue #6368

@micbar
Copy link
Contributor

micbar commented Jan 17, 2024

I sketched a possible approach in the linked ticket.

@butonic
Copy link
Member

butonic commented Feb 5, 2024

@aduffeck and @2403905 were digging into this. most recent comment with options going forward: #8273 (comment)

@aduffeck is in posix wonderland. @2403905 are you looking into this? If so, assign yourself?

@dragonchaser dragonchaser self-assigned this Feb 5, 2024
@dragonchaser dragonchaser moved this from Prio 2 to In progress in Infinite Scale Team Board Feb 5, 2024
@2403905
Copy link
Contributor

2403905 commented Feb 5, 2024

@butonic If I am not mistaken @aduffeck added the fix cs3org/reva#4464 and now we shouldn't see an error when try to change the permission of the locked file.

@dragonchaser dragonchaser removed their assignment Feb 5, 2024
@dragonchaser dragonchaser moved this from In progress to Prio 2 in Infinite Scale Team Board Feb 5, 2024
@2403905
Copy link
Contributor

2403905 commented Feb 5, 2024

I retested. The bug is gone with the Don't check locks grants changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug Type:Regression
Projects
Archived in project
Development

No branches or pull requests

6 participants