mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 14:23:17 -04:00
enable deleting/configuring new tokens
Signed-off-by: Robin Appelman <icewind@owncloud.com>
This commit is contained in:
parent
1afccde16a
commit
da63af8b02
3 changed files with 12 additions and 4 deletions
|
|
@ -135,11 +135,13 @@ class AuthSettingsController extends Controller {
|
|||
|
||||
$token = $this->generateRandomDeviceToken();
|
||||
$deviceToken = $this->tokenProvider->generateToken($token, $this->uid, $loginName, $password, $name, IToken::PERMANENT_TOKEN);
|
||||
$tokenData = $deviceToken->jsonSerialize();
|
||||
$tokenData['canDelete'] = true;
|
||||
|
||||
return [
|
||||
'token' => $token,
|
||||
'loginName' => $loginName,
|
||||
'deviceToken' => $deviceToken
|
||||
'deviceToken' => $tokenData
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -172,14 +172,20 @@ table.nostyle td { padding: 0.2em 0; }
|
|||
}
|
||||
#sessions .token-list a.icon,
|
||||
#apppasswords .token-list a.icon {
|
||||
display: block;
|
||||
opacity: 0.6;
|
||||
margin-top: 4px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#sessions .token-list tr:hover a.icon,
|
||||
#apppasswords .token-list tr:hover a.icon {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#sessions .token-list td div.configure,
|
||||
#apppasswords .token-list td div.configure {
|
||||
display: none;
|
||||
height: 18px;
|
||||
}
|
||||
|
||||
#sessions .token-list tr.active div.configure,
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@
|
|||
|
||||
var list = this.$('.token-list');
|
||||
var tokens = this.collection.filter(function (token) {
|
||||
return parseInt(token.get('type'), 10) === _this.type;
|
||||
return token.get('type') === _this.type;
|
||||
});
|
||||
list.html('');
|
||||
|
||||
|
|
@ -110,7 +110,7 @@
|
|||
var ts = viewData.lastActivity * 1000;
|
||||
viewData.lastActivity = OC.Util.relativeModifiedDate(ts);
|
||||
viewData.lastActivityTime = OC.Util.formatDate(ts, 'LLL');
|
||||
viewData.canScope = token.get('type') === '1';
|
||||
viewData.canScope = token.get('type') === 1;
|
||||
|
||||
// preserve title for cases where we format it further
|
||||
viewData.title = viewData.name;
|
||||
|
|
|
|||
Loading…
Reference in a new issue