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

Change wording of Role Descriptions #11381

Closed
kulmann opened this issue Mar 8, 2024 · 37 comments · Fixed by #11661
Closed

Change wording of Role Descriptions #11381

kulmann opened this issue Mar 8, 2024 · 37 comments · Fixed by #11661
Assignees
Labels
Priority:p2-high Escalation, on top of current planning, release blocker Type:Bug Something isn't working

Comments

@kulmann
Copy link
Contributor

kulmann commented Mar 8, 2024

Describe the bug

OnlyOffice can write documents from a public link share with "Can upload" role.

Steps to reproduce

  1. As "admin", create asdf/test.docx via OnlyOffice
  2. As "admin", create a public link to the folder asdf with Can upload role (which states permissions view, download and upload)
  3. As anonymous, receive and follow the public link
  4. As anonymous, open asdf/test.docx via OnlyOffice
  5. As anonymous, write some content into the file and leave the document again
  6. As "admin", see that the changes have been written to disk (e.g. by downloading the file after the lock has been released)

Expected behavior

"anonymous" should have a read only view or at least an error message when trying to save.

Actual behavior

"anonymous" can edit and save the document.

@kulmann kulmann added Type:Bug Something isn't working Priority:p2-high Escalation, on top of current planning, release blocker labels Mar 8, 2024
@kulmann
Copy link
Contributor Author

kulmann commented Mar 8, 2024

confirmed in both v5.0.0-rc.5 and v4.0.6

@2403905
Copy link
Contributor

2403905 commented Mar 8, 2024

Step 2. Is admin create a public link to this file with the Can upload role using API or UI ?
The Can upload role has to be used for folders, bu not for files.

@kulmann
Copy link
Contributor Author

kulmann commented Mar 8, 2024

Step 2. Is admin create a public link to this file with the Can upload role using API or UI ?

The Can upload role has to be used for folders, bu not for files.

Updated the steps to reproduce. Thank you. I tested it with a folder and thought it can be just done the same way with a file, sorry. Everything done via UI, nothing directly via API.

@phil-davis
Copy link
Contributor

To clarify, the "upload" permission should allow "anonymous" to create new files in the folder, but not overwrite (=edit) existing files.

After "anonymous" has uploaded a file, they should not be able to change what they uploaded (can't edit it or delete it), but should be able to list the files and download files.

Correct?

@individual-it
Copy link
Member

What API is OnlyOffice using for that? I'm surprised the API tests did not catch it

@micbar
Copy link
Contributor

micbar commented Mar 11, 2024

Wopi

@kulmann
Copy link
Contributor Author

kulmann commented Mar 11, 2024

To clarify, the "upload" permission should allow "anonymous" to create new files in the folder, but not overwrite (=edit) existing files.

After "anonymous" has uploaded a file, they should not be able to change what they uploaded (can't edit it or delete it), but should be able to list the files and download files.

Correct?

Correct, thank you!

@2403905 2403905 self-assigned this Mar 11, 2024
@ScharfViktor
Copy link
Contributor

We have e2e coverage for an app provider. It is not very large, because we wanted to implement only primitive tests as a first step (create and open a docx or odt document).
Maybe we should increase the coverage with e2e?

@individual-it
Copy link
Member

Yes I think we should. I believe the decision to make only small coverage was because the security related code path should be the same as with webDAV, but that does not look like its true

@2403905
Copy link
Contributor

2403905 commented Mar 11, 2024

@kulmann I found the place in a code when we give the write permissions to OnlyOffice but it is not a root issue. Because the permissions statements (view, download and upload) do not contradict that.
If a user can upload then the user can change the file, right?

@2403905
Copy link
Contributor

2403905 commented Mar 11, 2024

@micbar @kulmann Is the upload permission redundant in this case?

@kulmann
Copy link
Contributor Author

kulmann commented Mar 11, 2024

If a user can upload then the user can change the file, right?

No... @phil-davis interpretation is what we want: The user can upload files, but not overwrite existing files.

@2403905
Copy link
Contributor

2403905 commented Mar 11, 2024

We should clarify the public permission definitions.
FYI @tbsbdr @micbar

@micbar
Copy link
Contributor

micbar commented Mar 11, 2024

If a user can upload then the user can change the file, right?

No... @phil-davis interpretation is what we want: The user can upload files, but not overwrite existing files.

Hm, from a feature POV i tend to agree.

In the CS3 API there is no distinction, upload means also overwrite.

IMHO not solvable in this API version.

@individual-it
Copy link
Member

How does the WebDAV API currently react in that case?

@tbsbdr
Copy link

tbsbdr commented Mar 13, 2024

Currently I see 3 options

  1. fix the bug
  2. Add "edit" to the role description
  3. remove the whole role "Uploader"

I'd favour the 3rd option for now, as Uploader and Editor would then be almost the same. what do you think @kulmann @micbar ?

@kulmann
Copy link
Contributor Author

kulmann commented Mar 13, 2024

Option 3 would be fine by me. UX-wise the differentiation is hard to understand anyway. So might actually be an improvement...

@micbar
Copy link
Contributor

micbar commented Mar 13, 2024

yes. Option 3 is the best.

@tbsbdr
Copy link

tbsbdr commented Mar 13, 2024

ok, so lets remove this role from the link 😬

@micbar
Copy link
Contributor

micbar commented Mar 13, 2024

Hm, that would need a migration 😱

@2403905 2403905 removed their assignment Mar 20, 2024
@2403905
Copy link
Contributor

2403905 commented Apr 8, 2024

Is the "can upload" should be changed to "can edit" or "can view"?

@micbar
Copy link
Contributor

micbar commented Apr 8, 2024

Yes. We need a better description which matches our behavior

@micbar
Copy link
Contributor

micbar commented Apr 17, 2024

@tbsbdr @kulmann
Let us fix the description.

@tbsbdr tbsbdr self-assigned this May 27, 2024
@tbsbdr
Copy link

tbsbdr commented May 27, 2024

@tbsbdr propose a text

@micbar micbar self-assigned this May 27, 2024
@tbsbdr
Copy link

tbsbdr commented May 29, 2024

🙈 adding "edit" to the description won't work, as text or md files can not be edited.
@micbar @kulmann I currently see 2 options and would choose the one with least effort. do you agree?

  1. fix the bug
  2. Add "edit" to the role description
  3. remove the whole role "Uploader"

@micbar
Copy link
Contributor

micbar commented May 29, 2024

@tbsbdr Not quite how i understand it.

The main difference is the "delete" permission. Edit is also true for txt and md files.

@tbsbdr
Copy link

tbsbdr commented May 29, 2024

I could Not Edit txt, can you?

@micbar
Copy link
Contributor

micbar commented May 29, 2024

you can upload a new txt file version.

@micbar
Copy link
Contributor

micbar commented May 29, 2024

The main problem here is the "edit" vs. "upload" semantics. From the ocis backend perspective, both are uploads and require the upload permission. This is different for directories. They are controlled by the create-directories permission.

@phil-davis
Copy link
Contributor

Note: "edit-save" and "upload-overwrite" really mean the same thing. There is no such thing as "editing" a file that is sitting on a server. Actually, there is also no such thing as "editing" a file on the local filesystem on my laptop. "editing" is a thing that is done in-memory with a user-interface (graphical (LibreOffice...) or textual (VI, nano, a line-based command-line editor...)

When the person doing the "editing" asks to "save", then the editor software does an "upload-overwrite" to the file, wherever the persistent storage is. It might rewrite the whole file, it might append to the end (if the change just adds to the file), it might overwrite just some bytes of the file (if it implements some optimized way of saving just the bits that changed).

@JustKiddingCode
Copy link

From a linux file system perspective, which is similar to webdav:
"upload" rights should mean "write permissions to directory, but not the files".
Uploading a file should check if the file exists and the user has write permissions to that file.

mkdir test
echo "bar" > test/foo # works, because of write permissions to test
chmod -w > test/foo
echo "foo" > test/foo # fails, permission denied

@micbar micbar changed the title OnlyOffice can write changes through an "upload" public link share Users can write changes through an "upload" public link share Jul 8, 2024
@tbsbdr
Copy link

tbsbdr commented Jul 8, 2024

@tbsbdr adjust wording for the role

@micbar micbar changed the title Users can write changes through an "upload" public link share [PM] Users can write changes through an "upload" public link share Jul 8, 2024
@tbsbdr
Copy link

tbsbdr commented Jul 31, 2024

Suggestion for the rewording of the roles description.

  • Assuming that "Only for invited ppl" will be removed
  • Adds edit to Can upload
  • Adds delete to Can edit
  • I'd prefer to be less verbose in the role description (option 2)
  • Note: In general I'd prefer to remove the Uploader role at all, as it adds little value for the user, but if I understand @micbar correctly this would be expensive due to a migration necessity.

@kulmann is option 2 - less verbose, fine for you?

1) Verbose 2) Less verbose
Image Image

General overview

Needs authentication delete upload/edit view download upload (existing content not revealed)
Invited People (✅) (✅) (✅) (✅)
Can edit
Can upload
Can view
Secret File Drop

@tbsbdr
Copy link

tbsbdr commented Aug 2, 2024

@kulmann whats your opinion - go or no? 👆

@kulmann
Copy link
Contributor Author

kulmann commented Aug 2, 2024

We had that in the past and changed it to being more verbose because people had difficulties understanding the implications. Now that the whole context is more verbose we may as well go back to less verbose within the dropdown. Fine by me.

@tbsbdr tbsbdr removed their assignment Aug 2, 2024
@tbsbdr tbsbdr changed the title [PM] Users can write changes through an "upload" public link share Change wording of Role Descriptions Aug 2, 2024
@rhafer
Copy link

rhafer commented Aug 20, 2024

@kulmann So I guess this would be a web ticket now? On the server side we don't have any descriptive texts for the public link types AFAICS.

@kulmann kulmann transferred this issue from owncloud/ocis Aug 21, 2024
@kulmann
Copy link
Contributor Author

kulmann commented Aug 21, 2024

@kulmann So I guess this would be a web ticket now? On the server side we don't have any descriptive texts for the public link types AFAICS.

Seems like it, yes. Transferred it to web now.

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 Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

10 participants