From d6eb3137d332dad975ab78dc742fc7e767fa5baa Mon Sep 17 00:00:00 2001 From: grimsi <9295182+grimsi@users.noreply.github.com> Date: Thu, 2 Oct 2025 10:33:01 +0200 Subject: [PATCH] Fix check of request limit of limit is set to 0 (unlimited) --- .../main/kotlin/org/gameyfin/app/requests/GameRequestService.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/kotlin/org/gameyfin/app/requests/GameRequestService.kt b/app/src/main/kotlin/org/gameyfin/app/requests/GameRequestService.kt index 3f81d65..5676e3f 100644 --- a/app/src/main/kotlin/org/gameyfin/app/requests/GameRequestService.kt +++ b/app/src/main/kotlin/org/gameyfin/app/requests/GameRequestService.kt @@ -102,7 +102,7 @@ class GameRequestService( listOf(GameRequestStatus.PENDING) ) val maxRequestsPerUser = config.get(ConfigProperties.Requests.Games.MaxOpenRequestsPerUser) ?: 0 - if (maxRequestsPerUser == 0 || (auth?.isAdmin() != true && pendingRequestsForUser.size >= maxRequestsPerUser)) { + if (maxRequestsPerUser != 0 && auth?.isAdmin() != true && pendingRequestsForUser.size >= maxRequestsPerUser) { throw EndpointException("You have reached the maximum number of pending requests (${maxRequestsPerUser})") }