]> source.dussan.org Git - nextcloud-server.git/commitdiff
log circles and remote shares in admin_audit 16627/head
authorSascha Wiswedel <sascha.wiswedel@nextcloud.com>
Sun, 28 Jul 2019 12:16:43 +0000 (14:16 +0200)
committerBackportbot <backportbot-noreply@rullzer.com>
Thu, 1 Aug 2019 10:36:10 +0000 (10:36 +0000)
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',
+                               ]
+                       );
                }
        }