Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2021-07-26 13:35:48 +0300
committerGitHub <noreply@github.com>2021-07-26 13:35:48 +0300
commitb31c08e536edd4a2ae6d07bf79c58fa7486b2e9b (patch)
tree93648b2ef496588a437a318f7f17c9f31212a73f
parent0d5d3ad9fd12ef3337cdb4a61785d42b2ea6bc9a (diff)
parent4570bb4f65b9e7683e3ae0296585e460aa3c9470 (diff)
Merge pull request #28075 from nextcloud/enh/noid/admin_audit-report-full-path
Admin Audit - Sharing: createShare - report the full path
-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