summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2017-07-12 13:04:54 +0200
committerGitHub <noreply@github.com>2017-07-12 13:04:54 +0200
commit86a496d94ae438ae5de033fd6d9c5bee19ed4fcf (patch)
tree6e732e1beb26840b6345c48495c129eab173d8d0 /core
parent08d3cb9107ef800112cc131dfd41b0dd6c43f1f7 (diff)
parent44d39d87c015e039fc0ed4fd4ad0668899676233 (diff)
downloadnextcloud-server-86a496d94ae438ae5de033fd6d9c5bee19ed4fcf.tar.gz
nextcloud-server-86a496d94ae438ae5de033fd6d9c5bee19ed4fcf.zip
Merge pull request #5567 from nextcloud/public-capabilities
Public capabilities API
Diffstat (limited to 'core')
-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);
}