fix(sessions): Hide one-time app passwords

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2025-10-01 22:55:48 +02:00 committed by Maksim Sukharev
parent 6b121c37da
commit e7d0ed2020
2 changed files with 5 additions and 2 deletions

View file

@ -33,7 +33,7 @@
import { translate as t } from '@nextcloud/l10n'
import { defineComponent } from 'vue'
import AuthToken from './AuthToken.vue'
import { useAuthTokenStore } from '../store/authtoken.ts'
import { TokenType, useAuthTokenStore } from '../store/authtoken.ts'
export default defineComponent({
name: 'AuthTokenList',
@ -48,7 +48,9 @@ export default defineComponent({
computed: {
sortedTokens() {
return [...this.authTokenStore.tokens].sort((t1, t2) => t2.lastActivity - t1.lastActivity)
return [...this.authTokenStore.tokens]
.filter((t) => t.type !== TokenType.ONETIME_TOKEN)
.sort((t1, t2) => t2.lastActivity - t1.lastActivity)
},
},

View file

@ -31,6 +31,7 @@ export enum TokenType {
TEMPORARY_TOKEN = 0,
PERMANENT_TOKEN = 1,
WIPING_TOKEN = 2,
ONETIME_TOKEN = 3,
}
export interface IToken {