From: Julius Härtl Date: Tue, 8 Dec 2020 11:56:54 +0000 (+0100) Subject: Handle deck share type in audit and dav app X-Git-Tag: v21.0.0beta1~8^2~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bac1651380f8330a5660d44d098f427f1cef8b4b;p=nextcloud-server.git Handle deck share type in audit and dav app Signed-off-by: Julius Härtl --- diff --git a/apps/admin_audit/lib/Actions/Sharing.php b/apps/admin_audit/lib/Actions/Sharing.php index 2c28660a56f..cab02ab1886 100644 --- a/apps/admin_audit/lib/Actions/Sharing.php +++ b/apps/admin_audit/lib/Actions/Sharing.php @@ -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', + ] + ); } } diff --git a/apps/dav/lib/Connector/Sabre/SharesPlugin.php b/apps/dav/lib/Connector/Sabre/SharesPlugin.php index 3abdf6c2546..c4b8f0a4623 100644 --- a/apps/dav/lib/Connector/Sabre/SharesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/SharesPlugin.php @@ -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( diff --git a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php index 27af0b1501b..f48e6522722 100644 --- a/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php +++ b/apps/dav/tests/unit/Connector/Sabre/SharesPluginTest.php @@ -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]],