From e98b2cb46138a786b1f21e93b7cee77272834491 Mon Sep 17 00:00:00 2001 From: Sascha Wiswedel Date: Fri, 26 Jul 2019 13:37:22 +0200 Subject: [PATCH] log email shares in admin_audit log Signed-off-by: Sascha Wiswedel --- apps/admin_audit/lib/Actions/Sharing.php | 25 ++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/apps/admin_audit/lib/Actions/Sharing.php b/apps/admin_audit/lib/Actions/Sharing.php index 0c4601eef3..dea13e21c7 100644 --- a/apps/admin_audit/lib/Actions/Sharing.php +++ b/apps/admin_audit/lib/Actions/Sharing.php @@ -91,6 +91,19 @@ class Sharing extends Action { 'id', ] ); + } elseif($params['shareType'] === Share::SHARE_TYPE_EMAIL) { + $this->log( + 'The %s "%s" with ID "%s" has been shared to the email recipient "%s" with permissions "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'itemTarget', + 'itemSource', + 'shareWith', + 'permissions', + 'id', + ] + ); } } @@ -147,6 +160,18 @@ class Sharing extends Action { 'id', ] ); + } elseif($params['shareType'] === Share::SHARE_TYPE_EMAIL) { + $this->log( + 'The %s "%s" with ID "%s" has been unshared from the email recipient "%s" (Share ID: %s)', + $params, + [ + 'itemType', + 'fileTarget', + 'itemSource', + 'shareWith', + 'id', + ] + ); } }