You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot share with user with more permissions when user has access through group read-only #25359
A bisect shows that this problem starts to appear after we made the share dialog use the public OCS Share API instead of the old internal ajax endpoints: #21860
It is likely that the OCS Share API never allowed this configuration before, so need to find a way to make it align to the way the old API behaved.
Looks like it's not as easy as just backporting it. Even applying this wouldn't solve the problem.
It seems it might have been broken again later on and then fixed again.
From what I see on master the order between "setShareOwner" and "userCreateChecks" has been changed at some point. It makes sense to first set the owner before doing the checks.
I'll try and fix this manually then instead of backporting.
Activity
PVince81 commentedon Jul 5, 2016
A bisect shows that this problem starts to appear after we made the share dialog use the public OCS Share API instead of the old internal ajax endpoints: #21860
It is likely that the OCS Share API never allowed this configuration before, so need to find a way to make it align to the way the old API behaved.
PVince81 commentedon Jul 5, 2016
Weiiiird, this seems to work on master. I found this check in the code: https://github.com/owncloud/core/blob/stable9/lib/private/share20/manager.php#L362
It would only show the error if someone else tried to share with that user. If the share owner is the same, it goes through.
Now to find out why it works on master and not stable9.
PVince81 commentedon Jul 5, 2016
Aha! It turns out that the share owner of the new share isn't set properly (null), so the comparison would always be true: https://github.com/owncloud/core/blob/stable9/lib/private/share20/manager.php#L362
Now to find out what commit fixed it in master
PVince81 commentedon Jul 5, 2016
Found it, this is the commit that fixes it on master: afa37d3
PVince81 commentedon Jul 5, 2016
Looks like it's not as easy as just backporting it. Even applying this wouldn't solve the problem.
It seems it might have been broken again later on and then fixed again.
From what I see on master the order between "setShareOwner" and "userCreateChecks" has been changed at some point. It makes sense to first set the owner before doing the checks.
I'll try and fix this manually then instead of backporting.
PVince81 commentedon Jul 5, 2016
Fix is here: #25360
lock commentedon Aug 4, 2019
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.