nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.43k stars 4.08k forks source link

[Bug]: Moving shared subfolder by sharee, removes access for owner #44176

Open hamza221 opened 8 months ago

hamza221 commented 8 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

When a user moves a shared subfolder, the owner looses access to that subfolder

Steps to reproduce

  1. Bob creates folder "Shared_folder"
  2. Bob creates subfolder "Shared_folder/Subfolder"
  3. Bob shares folder with Alice
  4. Alice Moves Subfolder to another directory
  5. Bob can't find Subfolder anymore

Expected behavior

Bob can still see and access "Subfolder"

Installation method

Community Docker image

Nextcloud Server version

27

Operating system

None

PHP engine version

None

Web server

None

Database engine version

None

Is this bug present after an update or on a fresh install?

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

No response

sorbaugh commented 7 months ago

Hello @Fenn-CS, please take a look 🙏 This is a "mild" case of data loss, but data loss nevertheless and we should fix it soon

nfebe commented 3 months ago

This is indeed how this works but I am not sure if it ca be classified as a case of data loss. Google drive handles this by warning on moves where there are shares.

Currently users can prevent this by setting custom permissions and unchecking the delete permission. This means that if the delete permission is removed "moves" currently fail, ungracefully so.

drive

Next steps:

Just like we have "Allow downloads" under advanced permissions we could add some new property like "Allow moves" or something and then make sure that delete is disambiguated from move because currently the system seems to handle moves as deletes in this scenario (and it is technically a delete for the original file owner).

advanced-permissions

nfebe commented 3 months ago

Hello @jancborchardt what do you think?

jancborchardt commented 2 months ago

@Fenn-CS a warning sounds very good here!

This was actually also a customer request and @nimishavijay proposed to add a notice in the file picker modal rather than another modal on top: https://github.com/nextcloud-gmbh/customer-feature-requests/issues/406#issuecomment-1523502575

The file picker will have the message Moving a file or folder out of a shared folder will unshare it from the group of people. in an info box above the buttons, something like this: image

The buttons itself will be the same :)

Would that be doable @Fenn-CS?