diff --git a/apps/admin_audit/lib/Actions/Sharing.php b/apps/admin_audit/lib/Actions/Sharing.php index 98fbbf7fbd961..329ed740b53c5 100644 --- a/apps/admin_audit/lib/Actions/Sharing.php +++ b/apps/admin_audit/lib/Actions/Sharing.php @@ -50,7 +50,7 @@ public function shared(array $params): void { $params, [ 'itemType', - 'itemTarget', + 'path', 'itemSource', 'permissions', 'id', @@ -62,7 +62,7 @@ public function shared(array $params): void { $params, [ 'itemType', - 'itemTarget', + 'path', 'itemSource', 'shareWith', 'permissions', @@ -75,7 +75,7 @@ public function shared(array $params): void { $params, [ 'itemType', - 'itemTarget', + 'path', 'itemSource', 'shareWith', 'permissions', @@ -88,7 +88,7 @@ public function shared(array $params): void { $params, [ 'itemType', - 'itemTarget', + 'path', 'itemSource', 'shareWith', 'permissions', @@ -101,7 +101,7 @@ public function shared(array $params): void { $params, [ 'itemType', - 'itemTarget', + 'path', 'itemSource', 'shareWith', 'permissions', @@ -114,7 +114,7 @@ public function shared(array $params): void { $params, [ 'itemType', - 'itemTarget', + 'path', 'itemSource', 'shareWith', 'permissions', @@ -127,7 +127,7 @@ public function shared(array $params): void { $params, [ 'itemType', - 'itemTarget', + 'path', 'itemSource', 'shareWith', 'permissions', @@ -140,7 +140,7 @@ public function shared(array $params): void { $params, [ 'itemType', - 'itemTarget', + 'path', 'itemSource', 'shareWith', 'permissions', @@ -153,7 +153,7 @@ public function shared(array $params): void { $params, [ 'itemType', - 'itemTarget', + 'path', 'itemSource', 'shareWith', 'permissions', diff --git a/lib/private/Share20/LegacyHooks.php b/lib/private/Share20/LegacyHooks.php index a1f856318c9a4..94cfa6636d72b 100644 --- a/lib/private/Share20/LegacyHooks.php +++ b/lib/private/Share20/LegacyHooks.php @@ -170,6 +170,7 @@ public function postShare(GenericEvent $e) { 'shareWith' => $share->getSharedWith(), 'itemTarget' => $share->getTarget(), 'fileTarget' => $share->getTarget(), + 'path' => $share->getNode()->getPath(), ]; \OC_Hook::emit(Share::class, 'post_shared', $postHookData); diff --git a/tests/lib/Share20/LegacyHooksTest.php b/tests/lib/Share20/LegacyHooksTest.php index a615e26afb071..5afee588c34db 100644 --- a/tests/lib/Share20/LegacyHooksTest.php +++ b/tests/lib/Share20/LegacyHooksTest.php @@ -342,6 +342,7 @@ public function testPostShare() { 'permissions' => Constants::PERMISSION_ALL, 'expiration' => $date, 'token' => 'token', + 'path' => null, ]; $hookListner