From 24982177b1598d3664852b84de84069c17f0c1c2 Mon Sep 17 00:00:00 2001 From: Mike Turley Date: Wed, 18 Sep 2024 10:46:56 -0400 Subject: [PATCH] Add comment for doServiceRequestWithGatingResource Signed-off-by: Mike Turley --- backend/src/utils/proxy.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/utils/proxy.ts b/backend/src/utils/proxy.ts index 44045018e6..b3f61c457a 100644 --- a/backend/src/utils/proxy.ts +++ b/backend/src/utils/proxy.ts @@ -143,6 +143,8 @@ export const proxyService = done(); }; + // If `model` is passed, we first check if the user has permission to get a resource with that model and the given namespace/name. + // We can use this to only proxy for users that can access some resource that manages the service. const doServiceRequestWithGatingResource = async () => { try { // Retreive the gating resource by name and namespace