diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-11-17 17:52:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-17 17:52:23 +0100 |
commit | bba32cf4b7ed52043b97debd404991b236fcaa36 (patch) | |
tree | 5fc90c9b7247b6071efcf2813455fbe853910a8c | |
parent | 54ca411ff097d64d33c2d1e90102ef1fb1927f40 (diff) | |
parent | d2dee32756f23024f8d2ebc0de8d3478dc784f41 (diff) | |
download | nextcloud-server-bba32cf4b7ed52043b97debd404991b236fcaa36.tar.gz nextcloud-server-bba32cf4b7ed52043b97debd404991b236fcaa36.zip |
Merge pull request #2163 from nextcloud/app-password-scope-warngings
fix warnings when updating app password
-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])); } } |