aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorszaimen <szaimen@e.mail.de>2021-07-21 00:32:11 +0200
committerszaimen (Rebase PR Action) <szaimen@e.mail.de>2021-07-22 14:20:05 +0000
commit4570bb4f65b9e7683e3ae0296585e460aa3c9470 (patch)
tree39b45da7714118eb544f756382fb705fed82e68b
parent4301267373ed6bb215a0f193ffacbc92f9781255 (diff)
downloadnextcloud-server-4570bb4f65b9e7683e3ae0296585e460aa3c9470.tar.gz
nextcloud-server-4570bb4f65b9e7683e3ae0296585e460aa3c9470.zip
Admin Audit - Sharing: createShare - report the full path
Signed-off-by: szaimen <szaimen@e.mail.de>
-rw-r--r--apps/admin_audit/lib/Actions/Sharing.php18
-rw-r--r--lib/private/Share20/LegacyHooks.php1
-rw-r--r--tests/lib/Share20/LegacyHooksTest.php1
3 files changed, 11 insertions, 9 deletions
diff --git a/apps/admin_audit/lib/Actions/Sharing.php b/apps/admin_audit/lib/Actions/Sharing.php
index 98fbbf7fbd9..329ed740b53 100644
--- a/apps/admin_audit/lib/Actions/Sharing.php
+++ b/apps/admin_audit/lib/Actions/Sharing.php
@@ -50,7 +50,7 @@ class Sharing extends Action {
$params,
[
'itemType',
- 'itemTarget',
+ 'path',
'itemSource',
'permissions',
'id',
@@ -62,7 +62,7 @@ class Sharing extends Action {
$params,
[
'itemType',
- 'itemTarget',
+ 'path',
'itemSource',
'shareWith',
'permissions',
@@ -75,7 +75,7 @@ class Sharing extends Action {
$params,
[
'itemType',
- 'itemTarget',
+ 'path',
'itemSource',
'shareWith',
'permissions',
@@ -88,7 +88,7 @@ class Sharing extends Action {
$params,
[
'itemType',
- 'itemTarget',
+ 'path',
'itemSource',
'shareWith',
'permissions',
@@ -101,7 +101,7 @@ class Sharing extends Action {
$params,
[
'itemType',
- 'itemTarget',
+ 'path',
'itemSource',
'shareWith',
'permissions',
@@ -114,7 +114,7 @@ class Sharing extends Action {
$params,
[
'itemType',
- 'itemTarget',
+ 'path',
'itemSource',
'shareWith',
'permissions',
@@ -127,7 +127,7 @@ class Sharing extends Action {
$params,
[
'itemType',
- 'itemTarget',
+ 'path',
'itemSource',
'shareWith',
'permissions',
@@ -140,7 +140,7 @@ class Sharing extends Action {
$params,
[
'itemType',
- 'itemTarget',
+ 'path',
'itemSource',
'shareWith',
'permissions',
@@ -153,7 +153,7 @@ class Sharing extends Action {
$params,
[
'itemType',
- 'itemTarget',
+ 'path',
'itemSource',
'shareWith',
'permissions',
diff --git a/lib/private/Share20/LegacyHooks.php b/lib/private/Share20/LegacyHooks.php
index a1f856318c9..94cfa6636d7 100644
--- a/lib/private/Share20/LegacyHooks.php
+++ b/lib/private/Share20/LegacyHooks.php
@@ -170,6 +170,7 @@ class LegacyHooks {
'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 a615e26afb0..5afee588c34 100644
--- a/tests/lib/Share20/LegacyHooksTest.php
+++ b/tests/lib/Share20/LegacyHooksTest.php
@@ -342,6 +342,7 @@ class LegacyHooksTest extends TestCase {
'permissions' => Constants::PERMISSION_ALL,
'expiration' => $date,
'token' => 'token',
+ 'path' => null,
];
$hookListner