]> source.dussan.org Git - nextcloud-server.git/commitdiff
Handle deck share type in audit and dav app
authorJulius Härtl <jus@bitgrid.net>
Tue, 8 Dec 2020 11:56:54 +0000 (12:56 +0100)
committerJulius Härtl <jus@bitgrid.net>
Wed, 9 Dec 2020 12:20:23 +0000 (13:20 +0100)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/admin_audit/lib/Actions/Sharing.php
apps/dav/lib/Connector/Sabre/SharesPlugin.php
apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php

index 2c28660a56f2c7b76a2fa6312f0b69521e6a916e..cab02ab188653546f6164c37028fcc67d37684bf 100644 (file)
@@ -146,6 +146,19 @@ class Sharing extends Action {
                                        'id',
                                ]
                        );
+               } elseif ($params['shareType'] === IShare::TYPE_DECK) {
+                       $this->log(
+                               'The %s "%s" with ID "%s" has been shared to the deck card "%s" with permissions "%s" (Share ID: %s)',
+                               $params,
+                               [
+                                       'itemType',
+                                       'itemTarget',
+                                       'itemSource',
+                                       'shareWith',
+                                       'permissions',
+                                       'id',
+                               ]
+                       );
                }
        }
 
@@ -250,6 +263,18 @@ class Sharing extends Action {
                                        'id',
                                ]
                        );
+               } elseif ($params['shareType'] === IShare::TYPE_DECK) {
+                       $this->log(
+                               'The %s "%s" with ID "%s" has been unshared from the deck card "%s" (Share ID: %s)',
+                               $params,
+                               [
+                                       'itemType',
+                                       'fileTarget',
+                                       'itemSource',
+                                       'shareWith',
+                                       'id',
+                               ]
+                       );
                }
        }
 
index 3abdf6c254694dd3156d18502ca09f32b635bac5..c4b8f0a462390b18890adaf01272072a923290e8 100644 (file)
@@ -121,6 +121,7 @@ class SharesPlugin extends \Sabre\DAV\ServerPlugin {
                        IShare::TYPE_EMAIL,
                        IShare::TYPE_ROOM,
                        IShare::TYPE_CIRCLE,
+                       IShare::TYPE_DECK,
                ];
                foreach ($requestedShareTypes as $requestedShareType) {
                        $shares = $this->shareManager->getSharesBy(
index 27af0b1501b4098017a9779440bd65865daba771..f48e652272257b9b85110a0bd4e314350e3c0167 100644 (file)
@@ -276,6 +276,7 @@ class SharesPluginTest extends \Test\TestCase {
                        [[IShare::TYPE_LINK]],
                        [[IShare::TYPE_REMOTE]],
                        [[IShare::TYPE_ROOM]],
+                       [[IShare::TYPE_DECK]],
                        [[IShare::TYPE_USER, IShare::TYPE_GROUP]],
                        [[IShare::TYPE_USER, IShare::TYPE_GROUP, IShare::TYPE_LINK]],
                        [[IShare::TYPE_USER, IShare::TYPE_LINK]],