mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
fix warnings when updating app password
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
61453f5fd5
commit
d2dee32756
2 changed files with 3 additions and 5 deletions
|
|
@ -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 [];
|
||||
|
|
|
|||
|
|
@ -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]));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue