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

[Bug] Can't rename files in Shared with me even though I have full access #639

Open
tprudentova opened this issue Jul 26, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@tprudentova
Copy link
Collaborator

1.0.3, staging, Firefox

  1. User A shares a file with User B though "Manage access" with permission level "Full access"
  2. User B opens the Shared with me section
  3. User B tries to rename the shared file
  4. "Unable to load your files"

Expectation: I can rename files when I have full access

Screen.Recording.2024-07-26.at.17.12.40.mov
@tprudentova tprudentova added the bug Something isn't working label Jul 26, 2024
@ericlinagora
Copy link
Contributor

This is an odd one in terms of rights, for example, say user A is storing HR complaints in my drive/complaints/b.txt and then shares b.txt with user B so they can read about it, if user B then renames the file, we have to check there isn't, in user A's complaints folder, already a file named like that, which would allow user B to find out wether there is a complaint against C by trying to rename his file to c.txt

@chibenwa
Copy link
Member

chibenwa commented Aug 22, 2024

Agreed this "feature" can lead to information disclosure.

I think here the issue arise from an unclear error handling. How about being clearer?

  • We are unable to rename this file as you miss acces rights on the parent folder
  • Also if I have edition right on the parent I expect rename to succeed...

@tprudentova
Copy link
Collaborator Author

Since this problem applies to basically any shared file/folder, maybe we should simply remove the "rename" option from the action menu?

@ericlinagora
Copy link
Contributor

I think the option of doing it when we have at least read rights on the parent folder works, with indeed a clearer message to explain what's up, it's as you wish

@tprudentova
Copy link
Collaborator Author

So, basically, we can do the following, right?

Folder tree: My Drive/Folder A/file.txt

Case 1: only file.txt is shared with me

Suggested behaviour:

  • I try to rename file.txt
  • I see a warning “You don’t have enough rights to rename this file”

Case 2: Folder A is also shared with me

Suggested behaviour for file.txt:

  • I try to rename file.txt
  • I can rename file.txt, yay!

Suggested behaviour for Folder A:

  • I try to rename Folder A
  • I see a warning “You don’t have enough rights to rename this folder” (because its parent folder is My Drive itself)

@ericlinagora
Copy link
Contributor

I think that works, but folder A wouldn't be a special case, however we really need to make an explicit message for this instance because there is no way any user could guess they need read access to the parent to do it, it's very counter-intuitive. Something like "You cannot rename a file/folder that is shared with you if you do not have read access to the parent folder of the file/folder (of the file's creator)"

@shepilov
Copy link
Member

guys, if the file is shared with "manage" permissions, it means user B has the same permissions as the owner of the file.
If you want to share complaints, you can share it with "read" or "write" permissions. And there is no need to check permission on the parent folder

@ericlinagora
Copy link
Contributor

what if you rename the file to a name that already exists in the parent folder then ?

@shepilov
Copy link
Member

@ericlinagora Yes, let's check "read" permissions for the parent folder for "rename" action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants