Don't update token if current session token
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
9ff6a2dab8
commit
850e67dea9
4 changed files with 5 additions and 4 deletions
|
@ -494,6 +494,7 @@ return array(
|
|||
'OC\\Authentication\\Token\\DefaultTokenCleanupJob' => $baseDir . '/lib/private/Authentication/Token/DefaultTokenCleanupJob.php',
|
||||
'OC\\Authentication\\Token\\DefaultTokenMapper' => $baseDir . '/lib/private/Authentication/Token/DefaultTokenMapper.php',
|
||||
'OC\\Authentication\\Token\\DefaultTokenProvider' => $baseDir . '/lib/private/Authentication/Token/DefaultTokenProvider.php',
|
||||
'OC\\Authentication\\Token\\INamedToken' => $baseDir . '/lib/private/Authentication/Token/INamedToken.php',
|
||||
'OC\\Authentication\\Token\\IProvider' => $baseDir . '/lib/private/Authentication/Token/IProvider.php',
|
||||
'OC\\Authentication\\Token\\IToken' => $baseDir . '/lib/private/Authentication/Token/IToken.php',
|
||||
'OC\\Authentication\\Token\\Manager' => $baseDir . '/lib/private/Authentication/Token/Manager.php',
|
||||
|
|
|
@ -524,6 +524,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
|
|||
'OC\\Authentication\\Token\\DefaultTokenCleanupJob' => __DIR__ . '/../../..' . '/lib/private/Authentication/Token/DefaultTokenCleanupJob.php',
|
||||
'OC\\Authentication\\Token\\DefaultTokenMapper' => __DIR__ . '/../../..' . '/lib/private/Authentication/Token/DefaultTokenMapper.php',
|
||||
'OC\\Authentication\\Token\\DefaultTokenProvider' => __DIR__ . '/../../..' . '/lib/private/Authentication/Token/DefaultTokenProvider.php',
|
||||
'OC\\Authentication\\Token\\INamedToken' => __DIR__ . '/../../..' . '/lib/private/Authentication/Token/INamedToken.php',
|
||||
'OC\\Authentication\\Token\\IProvider' => __DIR__ . '/../../..' . '/lib/private/Authentication/Token/IProvider.php',
|
||||
'OC\\Authentication\\Token\\IToken' => __DIR__ . '/../../..' . '/lib/private/Authentication/Token/IToken.php',
|
||||
'OC\\Authentication\\Token\\Manager' => __DIR__ . '/../../..' . '/lib/private/Authentication/Token/Manager.php',
|
||||
|
|
|
@ -451,7 +451,7 @@
|
|||
var tokenId = $row.data('id');
|
||||
var token = this.collection.get(tokenId);
|
||||
|
||||
if (_.isUndefined(token)) {
|
||||
if (_.isUndefined(token) || token.get('current') === true) {
|
||||
// Ignore event
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @author Christoph Wurst <christoph@owncloud.com>
|
||||
*
|
||||
|
@ -110,7 +109,7 @@ class AuthSettingsControllerTest extends TestCase {
|
|||
'canDelete' => false,
|
||||
'current' => true,
|
||||
'scope' => ['filesystem' => true],
|
||||
'canRename' => true,
|
||||
'canRename' => false,
|
||||
],
|
||||
[
|
||||
'id' => 200,
|
||||
|
@ -164,7 +163,7 @@ class AuthSettingsControllerTest extends TestCase {
|
|||
|
||||
$expected = [
|
||||
'token' => $newToken,
|
||||
'deviceToken' => ['dummy' => 'dummy', 'canDelete' => true],
|
||||
'deviceToken' => ['dummy' => 'dummy', 'canDelete' => true, 'canRename' => true],
|
||||
'loginName' => 'User13',
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue