-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
New user in group gets old behavior of "automatically accept incoming shares" #31870
Comments
This is not an issue for sharing with individual users - because a |
GitMate.io thinks the contributor most likely able to help you is @PVince81. Possibly related issues are #4435 (Accept incoming shares), #841 (Restrict users/groups to shared folders), #19153 (User Can Accept Shares from Other Users), #31613 ([stable10] Accept user share stable10), and #6167 (Sharing with a group). |
Hmmm I think this is because the group share entry in the database gets the group value "accepted=STATE_ACCEPTED" when the mode is "auto-accept" so it will default to accepted for every current and future members. New group shares will get "accepted=STATE_PENDING" so every new member will get the value "pending" when "auto-accept" is disabled. If we want to fix this we'd need to update all group states after toggling the checkbox. @pmaier1 is this something we want ? |
Some background: when a group share is created, we don't automatically generate sub-entries for every members. The sub-share-entries are only created once a recipient does a local change like renaming/moving the received share or unshare from self. This means that the "accepted" info isn't available in the DB until the user does something. So the value requires a default which is read from the group values. Now thinking of it, there might be another possible fix: if no sub-share is available, infer the value based on the "auto-accept" flag instead of the group "accept" value. It also means that the group's "accept" value becomes unused. Need to verify that it won't cause side effects. Tagging as bug for now, unless @pmaier1 has objections |
That sounds like the right fix - a group share does not need to remember the state of "auto-accept", because actually when a new user appears and has rights to a group share, then the way in which they are offered the share should be whatever is the current setting of "auto-accept". |
Estimate 0.5md for a fix I'm not sure if this should be a release blocker @pmaier1. @phil-davis can you prepare an acceptance test to enforce this behavior ? |
Yes, I will make an automated acceptance test scenario - should be easy enough. And with the suggested way to fix this, if it does not get into 10.0.9 then the behavior will just be a little inconsistent for a few weeks. Then it will "self-repair" when the fix is released. |
Yes, indeed |
PR #31913 has 3 acceptance test scenarios that currently will fail, but should pass. |
In doing that, I discovered an easier and bit more surprising scenario that fails:
Note: if |
Hint: These manage the notifications that are waiting (or not) for the user(s) receiving the share. So it probably needs some hooks for when a user is added or removed from a group, with names like And (hopefully) they would also get called when a user is created and added to groups "all at once", and similarly when deleting a user, the user gets removed from eaach group they are in, and pending notifications get removed... |
I agree with the expected behavior but don't see a huge issue with this. Yes, it can confuse users but everything will continue to work as normal. p3 is the right priority here. Fix would be nice but not a blocker from my POV. |
@phil-davis I don't think users added to a group should get a notification. If 100+ things were shared with this group since the beginning of time, that would be too many. Maybe one idea would be to receive only a single notification telling the user to go to "Shared with you" to accept many shares. Let's raise this one as a separate ticket for discussion. |
I have something based on this. The relevant changes are below:
While this fixes the main issue described above, the problem is that it there isn't anything that create a usergroup share on auto accept. This means that, when the admin switches from auto-accept to manually accept, all the shares that were auto accepted aren't accepted any longer. If we still want to go with this solution we'll need to solve this scenario too. |
Right. At this point I don't think we want to automatically create the entries as it could become a lot for big groups. Seems in this one case the UX would become worse. @jvillafanez any other ideas ? |
I don't have simple ideas that require minor changes. I'd prefer to keep things as simple as possible, so I'm not proposing crazy ideas that can be easily become a huge mess to implement, understand and maintain. Current options are:
In both cases, unless the user has explicitly accepted or rejected the group share, the default group share state will be used for each user. Taking into account that we don't expect changes in the configuration once it is set, I think we can use the second option because the UX is more consistent, and we can document the drawback with a big warning. |
The second proposed solution looks close to #31870 (comment), and will likely have the same effect: users having to reject and then re-accept ? I think this is a worse UX than with proposal one (leaving as it is now). The third alternative is to agree to change our minds about automatically creating sub-shares. But the benefit of this is too low compared to its complexity and increased migration time (when setting/unsetting the option it could take several minutes for updating) |
We could provide an occ migration tool to reset or auto-accept shares for everyone... I'm thinking of encryption: we already state that one should pick an encryption type at setup time and stick with it. Any change to it requires decrypting and reencrypting on the CLI. At this point I think I'd rather vote for "won't fix" |
Yes, users that haven't taken any explicit option (and as a consecuence they don't have their own share entry for the group) will have the share state changed. I'm not sure if the UX will be worse, but the behaviour for the scenario described in the issue feels more consistent with the new approach. In any case, both solutions will require documentation about this scenario on way or another to explain the behaviour.
I haven't checked the changes we'd need to do, but It shouldn't be too complex, and there shouldn't be any migration time (the change is made on the fly over the group share but not on any user of the group). The problem are big groups because these new entries should be created at the same time the group share is created. We might need to create 1000-10000 new entries, which will affect performance without any doubt. |
At the moment, if auto-accept is off, when someone shares an item with a big group then the backend code makes ("sends") a notification for every user in the group. I guess that already will take some time. |
The sending part will be moved to a background job when the group is big, scheduled as part of https://github.com/owncloud/enterprise/issues/2616 |
moving this to "development" as more discussion and evaluation needed |
Discussed with @pmaier1, current behavior is acceptable. Won't fix. |
Steps to reproduce
Have an existing system with users and groups, e.g.:
Group:
finance
with usersfin1
andfin2
User
fin1
shares folderfinance-folder
withfinance
groupUser
fin2
has logged in and has access tofinance-folder
As
admin
, disable "Automatically accept new incoming local user shares"As
admin
create more users, e.g.fin3
in groupfinance
Login as
fin3
- thefinance
share is automatically accepted and seen (not as per the current system setting above)Now let some months/years pass, and "everyone" has forgotten about the time when "Automatically accept new incoming local user shares" was enabled (and the time before that when the setting did not even exist)
fin1
creates a new folderother-finance-stuff
and shares it withfinance
group.finance
group get to choose to accept or decline the new share - good.admin
create new userfin4
in groupfinance
fin4
fin4
seesfinance-folder
automatically, without accepting it, but has to acceptother-finance-stuff
in order to see the filesfin4
wonders "why is this inconsistency?"fin4
calls the help desk.Expected behaviour
For a new user, when they first login, all the shares that they receive behave according to the current setting of "Automatically accept new incoming local user shares"
Actual behaviour
Old shares to groups keep their auto-accept behavior that was in place at the time they were created.
For existing users in the group, this is not really noticeable, because the existing users have likely logged in and already have the shared folder (or decided to decline it...).
But when a new user is added to the group, they get the old auto-accept behavior. If the new user is receiving multiple shares (e.g. they were added to multiple groups, or the group they were added to has multiple folders shared with it...) then some shares will be auto-accepted and some will need an accept/decline decision.
This will happen mostly for existing "old" sites. Their golden-oldy shares of "finance-files" "engineering-drawings"... will continue to behave in the old way as new users join the relevant groups. But new shares of "space-division-files" will behave in the new way.
Server configuration
10.0.9RC1
The text was updated successfully, but these errors were encountered: