From 1afccde16a04f9a91f9c5c46090517a54670f34d Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Wed, 3 Aug 2016 15:57:06 +0200 Subject: allow configuring filesystem access Signed-off-by: Robin Appelman --- settings/Controller/AuthSettingsController.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'settings/Controller') 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 []; + } } -- cgit v1.2.3