Sharing group shares stable7

backport of https://github.com/owncloud/core/pull/10107. I just want to give Jenkins the chance to test it before we merge it to stable7.
$result is always empty - I miss the deeper sense - sorry