Skip to content

Commit fd284f4

Browse files
authored
Merge pull request #27024 from nextcloud/enh/audit_log/expiration_date_removal
Properly log expiration date removal in audit log
2 parents 7a0cd9d + c728b1f commit fd284f4

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

apps/admin_audit/lib/Actions/Sharing.php

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -320,15 +320,26 @@ public function updatePassword(array $params): void {
320320
* @param array $params
321321
*/
322322
public function updateExpirationDate(array $params): void {
323-
$this->log(
324-
'The expiration date of the publicly shared %s with ID "%s" has been changed to "%s"',
325-
$params,
326-
[
327-
'itemType',
328-
'itemSource',
329-
'date',
330-
]
331-
);
323+
if ($params['date'] === null) {
324+
$this->log(
325+
'The expiration date of the publicly shared %s with ID "%s" has been changed removed',
326+
$params,
327+
[
328+
'itemType',
329+
'itemSource',
330+
]
331+
);
332+
} else {
333+
$this->log(
334+
'The expiration date of the publicly shared %s with ID "%s" has been changed to "%s"',
335+
$params,
336+
[
337+
'itemType',
338+
'itemSource',
339+
'date',
340+
]
341+
);
342+
}
332343
}
333344

334345
/**

0 commit comments

Comments
 (0)