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

What if some recipients decline / revoke the share? #18

Closed
michielbdejong opened this issue Oct 31, 2022 · 13 comments
Closed

What if some recipients decline / revoke the share? #18

michielbdejong opened this issue Oct 31, 2022 · 13 comments
Labels
question Further information is requested

Comments

@michielbdejong
Copy link
Contributor

No description provided.

@michielbdejong michielbdejong added the question Further information is requested label Oct 31, 2022
@michielbdejong
Copy link
Contributor Author

Local users cannot refuse a share, but foreign recipients can.
It gets particularly tricky when some recipients decline / revoke the share, and others don't.
How should we deal with that?

@michielbdejong
Copy link
Contributor Author

What if we create a full two-sided federated share for each foreign group member?
That would have the effect that the remote user can interact with the share without having to even know whether it was shared just with them or also with other people.
Would have to try out what this looks like in the GUI.

@michielbdejong
Copy link
Contributor Author

Local groups actually also have individual declines

@michielbdejong
Copy link
Contributor Author

Suppose there are 3 servers (A,B,C) and on each server there are 3 group members (A1,A2,A3,B1,B2,B3,C1,C2,C3).
User A1 shares a folder with the group.

  • On server A, one entry in the oc_share is created.
  • On server B, 3 entries in oc_share_external are created.
  • On server C, 3 entries in oc_share_external are created.

I think that is the setup I should try to build first, and then see how that works in practice.

@michielbdejong
Copy link
Contributor Author

Rule of thumb is that it should work the same when you receive a share through a federated (custom or regular) group as when you receive a share through a local (custom or regular) group.

@shokri-navid
Copy link
Collaborator

the share entry status in oc_share_external will be changed to 2

@michielbdejong
Copy link
Contributor Author

michielbdejong commented Dec 11, 2022

Hm, but when you receive a share through a local (custom or regular) group then there is no entry in oc_share_external, right? So that can't be the answer?
As you remarked in #28 (comment) points 2 and 3 the behaviour is different depending on whether all group members have set the checkbox to automatically accept group shares or not. Can you describe exactly what happens in both cases when:

  • a share is created
  • a group member accepts the share (if applicable)
  • a group member rejects the share (if applicable)
  • the owner deletes the file that was shared
  • another group member deletes the file that was shared
  • the owner revokes the share
  • another group member revokes the share

@michielbdejong
Copy link
Contributor Author

For local sharing to a regular group:

  • a type 1 share is created to the group (accepted 0)
  • for each user that doesn't have automatic accepting an additional type 2 share is created (accepted 1, "pending")

When John declines, accepted for his line changes to 2 (denied).
When he accepts, accepted changes to 0 (accepted)

@michielbdejong
Copy link
Contributor Author

For custom group, it's the same except that the value of share_with is customgroup_custom (for custom group name 'custom').

@michielbdejong
Copy link
Contributor Author

When the sharer deletes the item that was shared, the share silently disappears from everybody else's account.

@michielbdejong
Copy link
Contributor Author

If you decline a share after it was automatically accepted, then it also adds a row for you with share_type 2 and accepted 2.

@michielbdejong
Copy link
Contributor Author

The type-2 shares have the id of the type-1 shares in a parent column.

@michielbdejong
Copy link
Contributor Author

Nextcloud has IShare::TYPE_REMOTE_GROUP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants