mirror of
https://github.com/Suwayomi/Tachidesk.git
synced 2025-12-10 06:42:07 +01:00
GraphQL directly uses getUserFromToken and expects a valid user for (#1616)
other authentication methods, so re-introduce that check
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user