Handle deck share type in audit and dav app

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2020-12-08 12:56:54 +01:00
parent f2f3ad733f
commit bac1651380
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
3 changed files with 27 additions and 0 deletions

View 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',
]
);
}
}

View 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(

View 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]],