feat: hide invite-only networks from non-admin users in listing

This commit is contained in:
2026-05-30 06:40:49 +00:00
parent 2aad17f5e0
commit 55f24ea9e5
4 changed files with 240 additions and 2 deletions
+5 -1
View File
@@ -134,7 +134,11 @@ def list_networks(org_id):
return err
include_inactive = request.args.get("include_inactive", "false").lower() == "true"
networks = portal_network_service.list_networks(org_id, include_inactive=include_inactive)
networks = portal_network_service.list_networks(
org_id,
include_inactive=include_inactive,
user_id=g.current_user.id,
)
return api_response(
data={"networks": [n.to_dict() for n in networks], "count": len(networks)},