diff options
author | Robin Appelman <robin@icewind.nl> | 2016-11-16 16:27:56 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2016-11-16 19:14:36 +0100 |
commit | d2dee32756f23024f8d2ebc0de8d3478dc784f41 (patch) | |
tree | ca1fc7dbc3e5e93f9d689c3f0315e24bd9d3ea45 | |
parent | 61453f5fd5eb3e742d1c757def36ce8f6be408f3 (diff) | |
download | nextcloud-server-d2dee32756f23024f8d2ebc0de8d3478dc784f41.tar.gz nextcloud-server-d2dee32756f23024f8d2ebc0de8d3478dc784f41.zip |
fix warnings when updating app password
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | settings/Controller/AuthSettingsController.php | 3 | ||||
-rw-r--r-- | tests/Settings/Controller/AuthSettingsControllerTest.php | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/settings/Controller/AuthSettingsController.php b/settings/Controller/AuthSettingsController.php index 4e3d05a14e8..2a4b30dbd76 100644 --- a/settings/Controller/AuthSettingsController.php +++ b/settings/Controller/AuthSettingsController.php @@ -192,8 +192,7 @@ class AuthSettingsController extends Controller { public function update($id, array $scope) { $token = $this->tokenProvider->getTokenById($id); $token->setScope([ - 'filesystem' => $scope['filesystem'], - 'app' => array_values($scope['apps']) + 'filesystem' => $scope['filesystem'] ]); $this->tokenProvider->updateToken($token); return []; diff --git a/tests/Settings/Controller/AuthSettingsControllerTest.php b/tests/Settings/Controller/AuthSettingsControllerTest.php index 782c9f644e0..bb87958cf0f 100644 --- a/tests/Settings/Controller/AuthSettingsControllerTest.php +++ b/tests/Settings/Controller/AuthSettingsControllerTest.php @@ -212,15 +212,14 @@ class AuthSettingsControllerTest extends TestCase { $token->expects($this->once()) ->method('setScope') ->with($this->equalTo([ - 'filesystem' => true, - 'app' => ['dav', 'myapp'] + 'filesystem' => true ])); $this->tokenProvider->expects($this->once()) ->method('updateToken') ->with($this->equalTo($token)); - $this->assertSame([], $this->controller->update(42, ['filesystem' => true, 'apps' => ['dav', 'myapp']])); + $this->assertSame([], $this->controller->update(42, ['filesystem' => true])); } } |