aboutsummaryrefslogtreecommitdiffstats
path: root/settings/Controller
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2016-08-03 15:57:06 +0200
committerRobin Appelman <robin@icewind.nl>2016-11-16 15:24:27 +0100
commit1afccde16a04f9a91f9c5c46090517a54670f34d (patch)
tree400495cbb0f40c7054b5fc63539d3546aac1975b /settings/Controller
parentb4e27d35f59e359eb7591a15c7f037968081eb1b (diff)
downloadnextcloud-server-1afccde16a04f9a91f9c5c46090517a54670f34d.tar.gz
nextcloud-server-1afccde16a04f9a91f9c5c46090517a54670f34d.zip
allow configuring filesystem access
Signed-off-by: Robin Appelman <icewind@owncloud.com>
Diffstat (limited to 'settings/Controller')
-rw-r--r--settings/Controller/AuthSettingsController.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/settings/Controller/AuthSettingsController.php b/settings/Controller/AuthSettingsController.php
index 58994f0d59c..f097abf910b 100644
--- a/settings/Controller/AuthSettingsController.php
+++ b/settings/Controller/AuthSettingsController.php
@@ -180,4 +180,20 @@ class AuthSettingsController extends Controller {
return [];
}
+ /**
+ * @NoAdminRequired
+ * @NoSubadminRequired
+ *
+ * @param int $id
+ * @param array $scope
+ */
+ public function update($id, array $scope) {
+ $token = $this->tokenProvider->getTokenById($id);
+ $token->setScope([
+ 'filesystem' => $scope['filesystem'],
+ 'app' => array_values($scope['apps'])
+ ]);
+ $this->tokenProvider->updateToken($token);
+ return [];
+ }
}