2014-11-18 17:06:39 -05:00
|
|
|
<?php
|
2025-06-30 09:04:05 -04:00
|
|
|
|
2014-11-18 17:06:39 -05:00
|
|
|
/**
|
2024-06-02 09:26:54 -04: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 17:06:39 -05:00
|
|
|
*/
|
|
|
|
|
namespace OCA\Files_Trashbin;
|
|
|
|
|
|
2025-01-07 11:02:43 -05:00
|
|
|
use OCA\Files_Trashbin\Service\ConfigService;
|
2015-03-21 15:12:55 -04:00
|
|
|
use OCP\Capabilities\ICapability;
|
2014-11-18 17:06:39 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class Capabilities
|
|
|
|
|
*
|
|
|
|
|
* @package OCA\Files_Trashbin
|
|
|
|
|
*/
|
2015-03-21 15:12:55 -04:00
|
|
|
class Capabilities implements ICapability {
|
2014-11-18 17:06:39 -05:00
|
|
|
|
|
|
|
|
/**
|
2015-03-21 15:12:55 -04:00
|
|
|
* Return this classes capabilities
|
2023-06-14 10:36:05 -04:00
|
|
|
*
|
2025-01-07 11:02:43 -05:00
|
|
|
* @return array{
|
|
|
|
|
* files: array{
|
|
|
|
|
* undelete: bool,
|
|
|
|
|
* delete_from_trash: bool
|
|
|
|
|
* }
|
|
|
|
|
* }
|
2014-11-18 17:06:39 -05:00
|
|
|
*/
|
2015-03-21 15:12:55 -04:00
|
|
|
public function getCapabilities() {
|
|
|
|
|
return [
|
|
|
|
|
'files' => [
|
2025-01-07 11:02:43 -05:00
|
|
|
'undelete' => true,
|
|
|
|
|
'delete_from_trash' => ConfigService::getDeleteFromTrashEnabled(),
|
2015-03-21 15:12:55 -04:00
|
|
|
]
|
|
|
|
|
];
|
2014-11-18 17:06:39 -05:00
|
|
|
}
|
|
|
|
|
}
|