summaryrefslogtreecommitdiffstats
path: root/core/Controller/OCSController.php
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2017-06-30 11:08:04 +0200
committerJulius Härtl <jus@bitgrid.net>2017-06-30 11:08:04 +0200
commit51a0741005bc815a547d3cbbd9317dc317f03952 (patch)
treeb18d864379b997dd0b2313f75dcd9c58edb26d6b /core/Controller/OCSController.php
parent2afb4857cca4ca5eb48af63ab814727cfe77b1bd (diff)
downloadnextcloud-server-51a0741005bc815a547d3cbbd9317dc317f03952.tar.gz
nextcloud-server-51a0741005bc815a547d3cbbd9317dc317f03952.zip
Add public capabilities API
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core/Controller/OCSController.php')
-rw-r--r--core/Controller/OCSController.php9
1 files changed, 7 insertions, 2 deletions
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);
}