From 04ad0033d7d5fdb63a05c72ca00f709f65d26e8e Mon Sep 17 00:00:00 2001 From: Constantin Piber <59023762+cpiber@users.noreply.github.com> Date: Mon, 25 Aug 2025 12:02:12 +0200 Subject: [PATCH] GraphQL directly uses `getUserFromToken` and expects a valid user for (#1616) other authentication methods, so re-introduce that check --- .../main/kotlin/suwayomi/tachidesk/server/user/UserType.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/src/main/kotlin/suwayomi/tachidesk/server/user/UserType.kt b/server/src/main/kotlin/suwayomi/tachidesk/server/user/UserType.kt index fae75fa1..7743a066 100644 --- a/server/src/main/kotlin/suwayomi/tachidesk/server/user/UserType.kt +++ b/server/src/main/kotlin/suwayomi/tachidesk/server/user/UserType.kt @@ -34,6 +34,10 @@ fun UserType.requireUserWithBasicFallback(ctx: Context): Int = } fun getUserFromToken(token: String?): UserType { + if (serverConfig.authMode.value != AuthMode.UI_LOGIN) { + return UserType.Admin(1) + } + if (token.isNullOrBlank()) { return UserType.Visitor }