]> source.dussan.org Git - nextcloud-server.git/commitdiff
log email shares in admin_audit log 16566/head
authorSascha Wiswedel <wiswedel@users.noreply.github.com>
Fri, 26 Jul 2019 11:37:22 +0000 (13:37 +0200)
committerBackportbot <backportbot-noreply@rullzer.com>
Fri, 26 Jul 2019 14:15:45 +0000 (14:15 +0000)
Signed-off-by: Sascha Wiswedel <sascha.wiswedel@nextcloud.com>
apps/admin_audit/lib/Actions/Sharing.php

index 0c4601eef38ced17b8be48ca7383085804438308..dea13e21c7ebf20943adb2f8d5055462bad47294 100644 (file)
@@ -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',
+                               ]
+                       );                      
                }
        }