diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2015-03-21 20:12:55 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2015-08-10 10:45:16 +0200 |
commit | e84cffc063d508f8984909ba3e744eff970ecb88 (patch) | |
tree | 07bc4621077f256e3cb28748edab533791201a08 /apps/files_sharing/lib | |
parent | 7e6a2b71fd80fedabc64d10bee5ba0edc0b19cf0 (diff) | |
download | nextcloud-server-e84cffc063d508f8984909ba3e744eff970ecb88.tar.gz nextcloud-server-e84cffc063d508f8984909ba3e744eff970ecb88.zip |
Moved core apps to the capabilities manager
* Files
* Files_Sharing
* Files_Trashbin
* Files_Versions
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/capabilities.php | 32 |
1 files changed, 9 insertions, 23 deletions
diff --git a/apps/files_sharing/lib/capabilities.php b/apps/files_sharing/lib/capabilities.php index ac6454c3433..ef69a40078b 100644 --- a/apps/files_sharing/lib/capabilities.php +++ b/apps/files_sharing/lib/capabilities.php @@ -20,6 +20,7 @@ */ namespace OCA\Files_Sharing; +use OCP\Capabilities\ICapability; use \OCP\IConfig; /** @@ -27,32 +28,21 @@ use \OCP\IConfig; * * @package OCA\Files_Sharing */ -class Capabilities { +class Capabilities implements ICapability { /** @var IConfig */ private $config; - /** - * @param IConfig $config - */ public function __construct(IConfig $config) { $this->config = $config; } /** - * @return \OC_OCS_Result - */ - public static function getCapabilities() { - $config = \OC::$server->getConfig(); - $cap = new Capabilities($config); - return $cap->getCaps(); - } - - - /** - * @return \OC_OCS_Result + * Return this classes capabilities + * + * @return array */ - public function getCaps() { + public function getCapabilities() { $res = []; $public = []; @@ -76,12 +66,8 @@ class Capabilities { $res['resharing'] = $this->config->getAppValue('core', 'shareapi_allow_resharing', 'yes') === 'yes'; - - return new \OC_OCS_Result([ - 'capabilities' => [ - 'files_sharing' => $res - ], - ]); + return [ + 'files_sharing' => $res, + ]; } - } |