Add further capabilities to /cloud/capabilitites api call
This commit is contained in:
parent
6d74aa0d00
commit
f141f8b523
6 changed files with 63 additions and 1 deletions
|
@ -1,4 +1,6 @@
|
|||
<?php
|
||||
OC::$CLASSPATH['OCA\Files\Capabilities'] = 'apps/files/lib/capabilities.php';
|
||||
|
||||
$l = OC_L10N::get('files');
|
||||
|
||||
OCP\App::registerAdmin('files', 'admin');
|
||||
|
|
|
@ -9,3 +9,6 @@
|
|||
$this->create('download', 'download{file}')
|
||||
->requirements(array('file' => '.*'))
|
||||
->actionInclude('files/download.php');
|
||||
|
||||
// Register with the capabilities API
|
||||
OC_API::register('get', '/cloud/capabilities', array('OCA\Files\Capabilities', 'getCapabilities'), 'files', OC_API::USER_AUTH);
|
24
apps/files/lib/capabilities.php
Normal file
24
apps/files/lib/capabilities.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace OCA\Files;
|
||||
|
||||
class Capabilities {
|
||||
|
||||
public static function getCapabilities() {
|
||||
return new \OC_OCS_Result(array(
|
||||
'capabilities' => array(
|
||||
'files' => array(
|
||||
'bigfilechunking' => true,
|
||||
'undelete' => true,
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
}
|
|
@ -7,6 +7,7 @@ OC::$CLASSPATH['OCA\Encryption\Keymanager'] = 'apps/files_encryption/lib/keymana
|
|||
OC::$CLASSPATH['OCA\Encryption\Stream'] = 'apps/files_encryption/lib/stream.php';
|
||||
OC::$CLASSPATH['OCA\Encryption\Proxy'] = 'apps/files_encryption/lib/proxy.php';
|
||||
OC::$CLASSPATH['OCA\Encryption\Session'] = 'apps/files_encryption/lib/session.php';
|
||||
OC::$CLASSPATH['OCA\Encryption\Capabilities'] = 'apps/files_encryption/lib/capabilities.php';
|
||||
|
||||
OC_FileProxy::register( new OCA\Encryption\Proxy() );
|
||||
|
||||
|
|
9
apps/files_encryption/appinfo/routes.php
Normal file
9
apps/files_encryption/appinfo/routes.php
Normal 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('OCA\Encryption\Capabilities', 'getCapabilities'), 'files_encryption', OC_API::USER_AUTH);
|
23
apps/files_encryption/lib/capabilities.php
Normal file
23
apps/files_encryption/lib/capabilities.php
Normal file
|
@ -0,0 +1,23 @@
|
|||
<?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.
|
||||
*/
|
||||
|
||||
namespace OCA\Encryption;
|
||||
|
||||
class Capabilities {
|
||||
|
||||
public static function getCapabilities() {
|
||||
return new \OC_OCS_Result(array(
|
||||
'capabilities' => array(
|
||||
'files' => array(
|
||||
'encryption' => true,
|
||||
),
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue