Merge pull request #27324 from nextcloud/stable21-backport-27024

[stable21] Properly log expiration date removal in audit log
This commit is contained in:
Lukas Reschke 2021-06-09 22:08:07 +02:00 committed by GitHub
commit 393877ed59
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -320,15 +320,26 @@ class Sharing extends Action {
* @param array $params
*/
public function updateExpirationDate(array $params) {
$this->log(
'The expiration date of the publicly shared %s with ID "%s" has been changed to "%s"',
$params,
[
'itemType',
'itemSource',
'date',
]
);
if ($params['date'] === null) {
$this->log(
'The expiration date of the publicly shared %s with ID "%s" has been removed',
$params,
[
'itemType',
'itemSource',
]
);
} else {
$this->log(
'The expiration date of the publicly shared %s with ID "%s" has been changed to "%s"',
$params,
[
'itemType',
'itemSource',
'date',
]
);
}
}
/**