From e00da486b553ddcf57f3388874b87eea7d02b5e9 Mon Sep 17 00:00:00 2001 From: inference-bot Date: Wed, 30 Sep 2026 07:46:03 -0600 Subject: [PATCH] Fix broker 403 for members beyond Cloudron's default 25-user page: paginate all /users reads (per_page=100) --- app/main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/main.py b/app/main.py index 5d47d31..e5ccea5 100644 --- a/app/main.py +++ b/app/main.py @@ -904,7 +904,7 @@ async def cloudron_create_user(email: str, name: str) -> str: async with httpx.AsyncClient() as client: # Check if user exists r = await client.get( - f"{CLOUDRON_API}/api/v1/users", + f"{CLOUDRON_API}/api/v1/users?per_page=100", headers=cloudron_headers(), ) r.raise_for_status() @@ -998,7 +998,7 @@ async def cloudron_is_activated(user_id: str) -> bool: """ async with httpx.AsyncClient() as client: r = await client.get( - f"{CLOUDRON_API}/api/v1/users", + f"{CLOUDRON_API}/api/v1/users?per_page=100", headers=cloudron_headers(), ) r.raise_for_status() @@ -1857,7 +1857,7 @@ async def admin_overview(request: Request): try: async with httpx.AsyncClient(timeout=15.0) as client: r = await client.get( - f"{CLOUDRON_API}/api/v1/users", + f"{CLOUDRON_API}/api/v1/users?per_page=100", headers={"Authorization": f"Bearer {CLOUDRON_TOKEN}"}, ) r.raise_for_status() @@ -2057,7 +2057,7 @@ def resolve_member_email(identity: str) -> str: import urllib.request req = urllib.request.Request( - f"{CLOUDRON_API}/api/v1/users", + f"{CLOUDRON_API}/api/v1/users?per_page=100", headers={"Authorization": f"Bearer {CLOUDRON_TOKEN}"}, ) with urllib.request.urlopen(req, timeout=15) as r: