Skip to content

Commit

Permalink
Merge pull request #27326 from nextcloud/stable-19-backport-27024
Browse files Browse the repository at this point in the history
[stable19]  Properly log expiration date removal in audit log
  • Loading branch information
MorrisJobke authored Jun 7, 2021
2 parents 8871897 + 1b66bb7 commit a0fee00
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions apps/admin_audit/lib/Actions/Sharing.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,15 +295,26 @@ public function updatePassword(array $params) {
* @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',
]
);
}
}

/**
Expand Down

0 comments on commit a0fee00

Please sign in to comment.