sharing with group should work now
This commit is contained in:
parent
e88595638c
commit
33e0dfeecb
|
@ -293,9 +293,15 @@ class Hooks {
|
|||
|
||||
$usersSharing = $util->getSharingUsersArray( $sharingEnabled, $path );
|
||||
|
||||
// check if we share to a group
|
||||
if($params['shareType'] === \OCP\Share::SHARE_TYPE_GROUP) {
|
||||
$usersSharing[] = reset(\OC_Group::usersInGroup($params['shareWith']));
|
||||
} else {
|
||||
// Because this is a pre_share hook, the user
|
||||
// being shared to is not yet included; add them
|
||||
$usersSharing[] = $params['shareWith'];
|
||||
}
|
||||
|
||||
|
||||
// Attempt to set shareKey
|
||||
if ( ! $util->setSharedFileKeyfiles( $session, $usersSharing, $path ) ) {
|
||||
|
@ -310,7 +316,6 @@ class Hooks {
|
|||
// Set flag var 'run' to notify emitting
|
||||
// script that hook execution failed
|
||||
$params['run']->run = false;
|
||||
|
||||
// TODO: Make sure files_sharing provides user
|
||||
// feedback on failed share
|
||||
|
||||
|
|
Loading…
Reference in New Issue