cmllr / redundancy

Redundancy is a great lightweight software to create a cloud storage server without having too much load on your server.
GNU General Public License v3.0
27 stars 1 forks source link

Cannot delete file when shared #148

Closed cmllr closed 9 years ago

cmllr commented 9 years ago

When a share link is created, a file cannot be deleted (which is most likely an mySQL issue, deleting the entry in the FileSystem table also gives an error message complaining there's a relation to the SharedFileSystem table). Suggested bugfix: when deleting a file, check for shares and either silently remove them or ask for OK/abort.

(origin in issue #147) reported by @llebochequirit

lebochequirit commented 9 years ago

I can reproduce the bug under the following circumstances:

Fix could be: extend delete permission to delete also the share link.

I can also affirm that the bug does not show if a user with sufficient permissions shares a file and then deletes it. Guess that's because he has permissions on the share link.

So if you already fixed the link creation issue in #147, this one might get ...redundant. Har har.

Cheers,

L. B. Q. R.

lebochequirit commented 9 years ago

Update:

When sharing a file as a user with proper rights, the share link is created. When deleting this file and uploading the same file (ie. a file with the same name) that file is still shared.

So deleting a file does obviously not touch the share link. No idea how that fits into my sharelink-permission-theory :-)

L.B.Q.R.

cmllr commented 9 years ago

That is strange,

when deleting a file, every share gets deleted previously. Could you please update your R2 Instance to the :new: version?

We can also chat on https://gitter.im/Redundancycloud/public, if you want ;)