diff options
author | Christopher Ng <chrng8@gmail.com> | 2024-04-11 17:39:59 -0700 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2024-04-23 16:20:41 -0700 |
commit | 583517eb38c7ecbcc2d1d324bbe4195d97e567d2 (patch) | |
tree | 03492e5071c1bebe2a204d479a602d90f4912348 /apps/files_trashbin/lib | |
parent | caed644c03c3bbaff59135705f47be392402401c (diff) | |
download | nextcloud-server-583517eb38c7ecbcc2d1d324bbe4195d97e567d2.tar.gz nextcloud-server-583517eb38c7ecbcc2d1d324bbe4195d97e567d2.zip |
feat(trashbin): Add deleted by properties
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/files_trashbin/lib')
-rw-r--r-- | apps/files_trashbin/lib/Sabre/TrashbinPlugin.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php b/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php index 72b7332d9b1..512a2c072ea 100644 --- a/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php +++ b/apps/files_trashbin/lib/Sabre/TrashbinPlugin.php @@ -41,6 +41,8 @@ class TrashbinPlugin extends ServerPlugin { public const TRASHBIN_ORIGINAL_LOCATION = '{http://nextcloud.org/ns}trashbin-original-location'; public const TRASHBIN_DELETION_TIME = '{http://nextcloud.org/ns}trashbin-deletion-time'; public const TRASHBIN_TITLE = '{http://nextcloud.org/ns}trashbin-title'; + public const TRASHBIN_DELETED_BY_ID = '{http://nextcloud.org/ns}trashbin-deleted-by-id'; + public const TRASHBIN_DELETED_BY_DISPLAY_NAME = '{http://nextcloud.org/ns}trashbin-deleted-by-display-name'; /** @var Server */ private $server; @@ -83,6 +85,14 @@ class TrashbinPlugin extends ServerPlugin { return $node->getDeletionTime(); }); + $propFind->handle(self::TRASHBIN_DELETED_BY_ID, function () use ($node) { + return $node->getDeletedBy()?->getUID(); + }); + + $propFind->handle(self::TRASHBIN_DELETED_BY_DISPLAY_NAME, function () use ($node) { + return $node->getDeletedBy()?->getDisplayName(); + }); + $propFind->handle(FilesPlugin::SIZE_PROPERTYNAME, function () use ($node) { return $node->getSize(); }); |