diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-11-18 23:06:39 +0100 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-11-18 23:06:39 +0100 |
commit | 61641293f47914413179b60c8124e5e966c772bb (patch) | |
tree | 2843b5d0d15882c24d6af32a9265d08791c3d452 /apps/files_trashbin/lib | |
parent | 81d112fb428719bbb4a821cb90397772ab1c6eaf (diff) | |
download | nextcloud-server-61641293f47914413179b60c8124e5e966c772bb.tar.gz nextcloud-server-61641293f47914413179b60c8124e5e966c772bb.zip |
Only show undelete capability if files_trashbin is enabled
Fixes the OCS capability API at /ocs/v1.php/cloud/capabilities
Diffstat (limited to 'apps/files_trashbin/lib')
-rw-r--r-- | apps/files_trashbin/lib/capabilities.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/apps/files_trashbin/lib/capabilities.php b/apps/files_trashbin/lib/capabilities.php new file mode 100644 index 00000000000..3f137d22b6f --- /dev/null +++ b/apps/files_trashbin/lib/capabilities.php @@ -0,0 +1,32 @@ +<?php +/** + * Copyright (c) Lukas Reschke <lukas@owncloud.com> + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +namespace OCA\Files_Trashbin; + + +/** + * Class Capabilities + * + * @package OCA\Files_Trashbin + */ +class Capabilities { + + /** + * @return \OC_OCS_Result + */ + public static function getCapabilities() { + return new \OC_OCS_Result(array( + 'capabilities' => array( + 'files' => array( + 'undelete' => true, + ), + ), + )); + } + +} |