nextcloud / android

📱 Nextcloud Android app
https://play.google.com/store/apps/details?id=com.nextcloud.client
GNU General Public License v2.0
4.2k stars 1.75k forks source link

Deleted shares can not be reactivated #2624

Open thungsten opened 6 years ago

thungsten commented 6 years ago

Need server-side: nextcloud/server#2192

Actual behaviour

If you -deliberately or by accident- delete a share (folder or file) shared to you as read only in the Android app no option to reactivate/reinstantiate the folder is available to the user to whom the entity was shared. The event of sharing the object is still visible in the activity protocol but clicking on the link fails. The only option to get the shared object back is to revoke the share as sharing user and share again.

Expected behaviour

It should be possible to reinstantiate the shared folder, e.g. via activity protocol or a special menu within settings.

Steps to reproduce

  1. Let user A share a folder with user B or a group user B belongs to with read only permissions
  2. Log in user B to the Android client
  3. User B deletes the shared folder in the Android client (I deleted “globally“, not only “local“ but I think it doesn't matter)
  4. Open activity screen in Android client and select the (grayed out) deleted share

Environment data

Android version: Android 7.0

Device model: Samsung S7

Stock or customized system: Stock

Nextcloud app version: 3.1.0

Nextcloud server version: 13

tobiasKaminsky commented 6 years ago

@rullzer I remember that we talked about this. How is this done on server?

rullzer commented 6 years ago

Not possible currently

tobiasKaminsky commented 6 years ago

Is there an issue regarding this on server? So once this is working on server-side, we can tackle it on clients. (therefore I'll keep this open)

rullzer commented 6 years ago

https://github.com/nextcloud/server/issues/2192

thungsten commented 6 years ago

Is the evaluation result “not possible“ the answer to the described problem? If so: May I ask, why it is not possible?

As far as I can see the state “deleted“ is not distributed to other clients (with the same account logged in); I deleted a shared folder in Android and it still was available via the web interface. So I guess it is not stored on the server side (if it was stored on the server side it seems to me - from a outside perspective - it is not implemented in a sensible way).

So I deduce the Android client is holding the information “do not show“. It should be (more or less) fairly easy to alter this behaviour respectively add an option to delete items from this specific list or to reset the state.

If the client is synching the information “deleted“ (which apparently rather seems to be “do not show on the client) to the server it is a simple alter of or addendum to the SQL(?) queries and an additional URL endpoint to retrieve all “deleted“ shares; nevertheless it even shouldn't be difficult to either resend the share to the specific account.

The naive solution to revoke the share and reassign every user is really awkward and cumbersome.

rullzer commented 6 years ago

That is strange. The Delete send to the server (which I guess is what happens) should propegate to all other clients.

rullzer commented 6 years ago

If not then that is a bug ;)

Deelight-fr commented 5 years ago

I had the exact same problem. I had to remove a line in table 'share' to make the share visible again for the user who deleted it. That line was linked the the user, not the group (column 'share_with'), with 0 in the 'permissions' column.