diff --git a/apps/files_versions/appinfo/app.php b/apps/files_versions/appinfo/app.php index edd0a2f702..9ac86728cc 100644 --- a/apps/files_versions/appinfo/app.php +++ b/apps/files_versions/appinfo/app.php @@ -3,6 +3,7 @@ //require_once 'files_versions/versions.php'; OC::$CLASSPATH['OCA_Versions\Storage'] = 'apps/files_versions/lib/versions.php'; OC::$CLASSPATH['OCA_Versions\Hooks'] = 'apps/files_versions/lib/hooks.php'; +OC::$CLASSPATH['OC_Files_Versions_Capabiltiies'] = 'apps/files_versions/lib/capabilities.php'; OCP\App::registerAdmin('files_versions', 'settings'); OCP\App::registerPersonal('files_versions', 'settings-personal'); diff --git a/apps/files_versions/appinfo/routes.php b/apps/files_versions/appinfo/routes.php new file mode 100644 index 0000000000..125b96db17 --- /dev/null +++ b/apps/files_versions/appinfo/routes.php @@ -0,0 +1,9 @@ + + * This file is licensed under the Affero General Public License version 3 or later. + * See the COPYING-README file. + */ + +// Register with the capabilities API +OC_API::register('get', '/cloud/capabilities', array('OC_Files_Versions_Capabiltiies', 'getCapabilities'), 'ocs', OC_API::USER_AUTH); \ No newline at end of file diff --git a/apps/files_versions/lib/capabilities.php b/apps/files_versions/lib/capabilities.php new file mode 100644 index 0000000000..ac70773df0 --- /dev/null +++ b/apps/files_versions/lib/capabilities.php @@ -0,0 +1,22 @@ + + * This file is licensed under the Affero General Public License version 3 or + * later. + * See the COPYING-README file. + */ + +class OC_Files_Versions_Capabilities { + + public static function getCapabilities() { + return OC_OCS_Result(array( + 'capabilities' => array( + 'files_versions' => array( + 'versioning' => true, + ), + ), + )); + } + +} +?> \ No newline at end of file