]> source.dussan.org Git - nextcloud-server.git/commitdiff
log circles and remote shares in admin_audit 16586/head
authorSascha Wiswedel <sascha.wiswedel@nextcloud.com>
Sun, 28 Jul 2019 12:16:43 +0000 (14:16 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Thu, 1 Aug 2019 08:56:35 +0000 (10:56 +0200)
Signed-off-by: Sascha Wiswedel <sascha.wiswedel@nextcloud.com>
apps/admin_audit/lib/Actions/Sharing.php

index dea13e21c7ebf20943adb2f8d5055462bad47294..e3ce0c41481484fbdf77666f346ddbe08b583bfe 100644 (file)
@@ -103,7 +103,46 @@ class Sharing extends Action {
                                        'permissions',
                                        'id',
                                ]
-                       );                      
+                       );
+               } elseif($params['shareType'] === Share::SHARE_TYPE_CIRCLE) {
+                       $this->log(
+                               'The %s "%s" with ID "%s" has been shared to the circle "%s" with permissions "%s" (Share ID: %s)',
+                               $params,
+                               [
+                                       'itemType',
+                                       'itemTarget',
+                                       'itemSource',
+                                       'shareWith',
+                                       'permissions',
+                                       'id',
+                               ]
+                       );
+               } elseif($params['shareType'] === Share::SHARE_TYPE_REMOTE) {
+                       $this->log(
+                               'The %s "%s" with ID "%s" has been shared to the remote user "%s" with permissions "%s" (Share ID: %s)',
+                               $params,
+                               [
+                                       'itemType',
+                                       'itemTarget',
+                                       'itemSource',
+                                       'shareWith',
+                                       'permissions',
+                                       'id',
+                               ]
+                       );
+               } elseif($params['shareType'] === Share::SHARE_TYPE_REMOTE_GROUP) {
+                       $this->log(
+                               'The %s "%s" with ID "%s" has been shared to the remote group "%s" with permissions "%s" (Share ID: %s)',
+                               $params,
+                               [
+                                       'itemType',
+                                       'itemTarget',
+                                       'itemSource',
+                                       'shareWith',
+                                       'permissions',
+                                       'id',
+                               ]
+                       );
                }
        }
 
@@ -171,7 +210,43 @@ class Sharing extends Action {
                                        'shareWith',
                                        'id',
                                ]
-                       );                      
+                       );
+               } elseif($params['shareType'] === Share::SHARE_TYPE_CIRCLE) {
+                       $this->log(
+                               'The %s "%s" with ID "%s" has been unshared from the circle "%s" (Share ID: %s)',
+                               $params,
+                               [
+                                       'itemType',
+                                       'fileTarget',
+                                       'itemSource',
+                                       'shareWith',
+                                       'id',
+                               ]
+                       );
+               } elseif($params['shareType'] === Share::SHARE_TYPE_REMOTE) {
+                       $this->log(
+                               'The %s "%s" with ID "%s" has been unshared from the remote user "%s" (Share ID: %s)',
+                               $params,
+                               [
+                                       'itemType',
+                                       'fileTarget',
+                                       'itemSource',
+                                       'shareWith',
+                                       'id',
+                               ]
+                       );
+               } elseif($params['shareType'] === Share::SHARE_TYPE_REMOTE_GROUP) {
+                       $this->log(
+                               'The %s "%s" with ID "%s" has been unshared from the remote group "%s" (Share ID: %s)',
+                               $params,
+                               [
+                                       'itemType',
+                                       'fileTarget',
+                                       'itemSource',
+                                       'shareWith',
+                                       'id',
+                               ]
+                       );
                }
        }