2014-11-18 23:06:39 +01:00
|
|
|
<?php
|
|
|
|
/**
|
2024-06-02 15:26:54 +02:00
|
|
|
* SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2014-11-18 23:06:39 +01:00
|
|
|
*/
|
|
|
|
namespace OCA\Files_Trashbin;
|
|
|
|
|
2025-01-07 17:02:43 +01:00
|
|
|
use OCA\Files_Trashbin\Service\ConfigService;
|
2015-03-21 20:12:55 +01:00
|
|
|
use OCP\Capabilities\ICapability;
|
2014-11-18 23:06:39 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Class Capabilities
|
|
|
|
*
|
|
|
|
* @package OCA\Files_Trashbin
|
|
|
|
*/
|
2015-03-21 20:12:55 +01:00
|
|
|
class Capabilities implements ICapability {
|
2014-11-18 23:06:39 +01:00
|
|
|
|
|
|
|
/**
|
2015-03-21 20:12:55 +01:00
|
|
|
* Return this classes capabilities
|
2023-06-14 16:36:05 +02:00
|
|
|
*
|
2025-01-07 17:02:43 +01:00
|
|
|
* @return array{
|
|
|
|
* files: array{
|
|
|
|
* undelete: bool,
|
|
|
|
* delete_from_trash: bool
|
|
|
|
* }
|
|
|
|
* }
|
2014-11-18 23:06:39 +01:00
|
|
|
*/
|
2015-03-21 20:12:55 +01:00
|
|
|
public function getCapabilities() {
|
|
|
|
return [
|
|
|
|
'files' => [
|
2025-01-07 17:02:43 +01:00
|
|
|
'undelete' => true,
|
|
|
|
'delete_from_trash' => ConfigService::getDeleteFromTrashEnabled(),
|
2015-03-21 20:12:55 +01:00
|
|
|
]
|
|
|
|
];
|
2014-11-18 23:06:39 +01:00
|
|
|
}
|
|
|
|
}
|