Skip to content

Exclude group from sharing after a share was created #17346

Closed

Description

@PVince81

Steps to reproduce

  1. Login as admin
  2. Create two users "user1" and "user2"
  3. Add "user1" to group "group1"
  4. Login as "user1"
  5. Create a folder "test"
  6. Upload 20-30 files into "test"
  7. Scroll down and share any file on the second page (best is in the middle), share it with "user2"
  8. Login as admin
  9. Go to the admin page and set "Exclude groups from sharing" to "group1".
  10. Login as "user2"

Expected result

Shared file not visible.

Actual result

Shared file is still there.
Additionally the JS code doesn't handle such situation very well, see #15856 (comment)

So basically there is a contradiction: the user still has an existing share but is now not allowed to share any more.

The problem is that "user1" has no way to remove that share. The only way is for "user2" to unshare from self.

This ticket is either about properly cleaning up shares after the share interdiction, or making sure that "forbidden" shares aren't visible any more.

@MorrisJobke @schiesbn @rullzer

CC @jnfrmarks @jvillafanez for an interesting test case and inspiration for other similar ones

Activity

  1. rullzer commented on Aug 20, 2015

    @rullzer
    Contributor

    Well this is really about what we expect the Exclude groups from sharing to mean.
    I would expect that if a user is not able to share anything then old shares should be removed.

  2. rullzer commented on Nov 18, 2015

    @rullzer
    Contributor

    First I was thinking just make the current shares invisible. So don't return them from the API. This is possible but does not scale. Since this would mean that each time we interact with the Sharing API we have to check from who the share we receive is (all the way up to the root share). As said this will not properly scale.

    So the second option would be to have a hook somewhere. That if a group is added we check for all the users in that group if they now can't share anymore and if that is the case we remove all their shares.

    I think the second option is cleanest. But it does risk removing all of a users shares if you accidentially enter the wrong group name...

  3. PVince81 commented on Nov 18, 2015

    @PVince81
    ContributorAuthor

    I don't think this has high priority though. Most important is that nothing breaks when this situation exists.

  4. added this to the backlog milestone on Mar 7, 2016
  5. PVince81 commented on Sep 23, 2016

    @PVince81
    ContributorAuthor

    not a bug then, by design. closing

  6. lock commented on Aug 3, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

  7. locked as resolved and limited conversation to collaborators on Aug 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions