Add capabilities exposure to the versioning app

This commit is contained in:
Tom Needham 2013-02-09 11:53:54 +00:00
parent 675afbc213
commit 5102596e6d
3 changed files with 32 additions and 0 deletions

View File

@ -3,6 +3,7 @@
//require_once 'files_versions/versions.php'; //require_once 'files_versions/versions.php';
OC::$CLASSPATH['OCA_Versions\Storage'] = 'apps/files_versions/lib/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['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::registerAdmin('files_versions', 'settings');
OCP\App::registerPersonal('files_versions', 'settings-personal'); OCP\App::registerPersonal('files_versions', 'settings-personal');

View File

@ -0,0 +1,9 @@
<?php
/**
* Copyright (c) 2013, Tom Needham <tom@owncloud.com>
* 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);

View File

@ -0,0 +1,22 @@
<?php
/**
* Copyright (c) 2013 Tom Needham <tom@owncloud.com>
* 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,
),
),
));
}
}
?>