mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 14:23:17 -04:00
feat(trashbin): Add deleted by properties
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
caed644c03
commit
583517eb38
1 changed files with 10 additions and 0 deletions
|
|
@ -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();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue