-
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
Group share + reshare parent inconsistent when child share entry is missing #13361
Comments
Thanks for debugging this with me @PVince81 much appreciated! |
If somebody feels adventurous to debug this behaviour on my coworking space's instance I can provide this person with access to a clone of that instance on my host system. |
This guy here has the same issue, parent is NULL for any newly created reshares inside that old group share: #12475 (comment) |
I wonder if it is related to the order of the shares in the database. Because now we have three setups that have been reported to produce parent=NULL, but in all my local tests the parent wasn't set to null even though the group-child was missing. |
I'm setting this to 8.0 because it has been reported several times already and produces broken reshares. |
CC @DeepDiver1975 for the milestone assignment |
I managed to reproduce the NULL parent issue.
The group share didn't have an entry for u2, so when resharing, the parent became "NULL". @schiesbn |
The group share doesn't need a entry for u2. user specific entries are only needed if the file_target differs. Re-Sharing should have the group share as parent. I will have a look at it tomorrow |
If after that I unassign "g2" from all users and redo the reshare, it works! Crazy! |
@schiesbn great, thanks. Maybe something goes wrong when checking for group memberships. There's then another bug when the parent is assigned to the group share instead of child (when no child is there): if the resharer users (here u2) unshares from self. It adds the missing child entry with 0 permisisons. But the reshare is still there! |
This would mean that we would need to update all group shares if users get added to groups. I would like to avoid this. |
Understood. Then maybe the reshare code should then take care of adding the "missing" group child instead of linking directly to the parent. |
Fix is here: #13423 It was a bug in |
Fixed by #13423 |
Steps to reproduce:
Notice that no child entry is created. (in versions >= 7.0.3 a child entry is automatically created)
6. Upgrade to 7.0.3, see that oc_share is still the same.
7. Upgrade to 7.0.4, still no child entry
8. Login as "u2"
9. Share "projects/subproject" with "u3"
10. Login as "u3"
11. Check that "subprojects" can be seen in both "All files" and "Shared with You" sections
12. Check
oc_share
:Notice that no child entry was created for u2 and the parent points directly to the group entry.
However, if you tried this on 7.0.4 without the upgrade path, the child entry would be there and the reshare would point to the child entry instead of the parent.
This works properly here but not sure if the behavior is correct, as it might cause inconsistencies.
Additionally @LukasReschke has met an environment where the reshare entry receives "NULL" as parent instead of the group parent id.
Still not clear how to reproduce this.
Whenever the parent is "NULL", the reshare is orphaned and logging in as "u3" will show the share under "Shared with you" but not under "All files"
Versions
Reproduced on v7.0.4
@schiesbn I cannot reproduce the case where "NULL" appears as parent, maybe you have a clue when such situation could happen ?
I still raised this ticket to document the case for the parent linking inconsistency.
I'd say best would be if the group child entry is auto-created on reshare, to make sure we link to the correct one. Unless you say it should always link the parent to the group share ?
Can anything go wrong here ?
The text was updated successfully, but these errors were encountered: