From 51a0741005bc815a547d3cbbd9317dc317f03952 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Fri, 30 Jun 2017 11:08:04 +0200 Subject: Add public capabilities API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- core/Controller/OCSController.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'core/Controller') diff --git a/core/Controller/OCSController.php b/core/Controller/OCSController.php index a709ab7b07b..35eac3a3d8b 100644 --- a/core/Controller/OCSController.php +++ b/core/Controller/OCSController.php @@ -80,7 +80,8 @@ class OCSController extends \OCP\AppFramework\OCSController { } /** - * @NoAdminRequired + * @PublicPage + * * @return DataResponse */ public function getCapabilities() { @@ -94,7 +95,11 @@ class OCSController extends \OCP\AppFramework\OCSController { 'edition' => '', ); - $result['capabilities'] = $this->capabilitiesManager->getCapabilities(); + if($this->userSession->isLoggedIn()) { + $result['capabilities'] = $this->capabilitiesManager->getCapabilities(); + } else { + $result['capabilities'] = $this->capabilitiesManager->getCapabilities(true); + } return new DataResponse($result); } -- cgit v1.2.3