瀏覽代碼

add user id check on extclient

(cherry picked from commit 00838cab522d1f5441d93b16ab11366295496638)
abhishek9686 1 年之前
父節點
當前提交
a44d5d7ba3
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      controllers/ext_client.go

+ 1 - 1
controllers/ext_client.go

@@ -394,7 +394,7 @@ func createExtClient(w http.ResponseWriter, r *http.Request) {
 		}
 		}
 		for _, extclient := range extclients {
 		for _, extclient := range extclients {
 			if extclient.RemoteAccessClientID != "" &&
 			if extclient.RemoteAccessClientID != "" &&
-				extclient.RemoteAccessClientID == customExtClient.RemoteAccessClientID && nodeid == extclient.IngressGatewayID {
+				extclient.RemoteAccessClientID == customExtClient.RemoteAccessClientID && extclient.OwnerID == caller.UserName && nodeid == extclient.IngressGatewayID {
 				// extclient on the gw already exists for the remote access client
 				// extclient on the gw already exists for the remote access client
 				err = errors.New("remote client config already exists on the gateway. it may have been created by another user with this same remote client machine")
 				err = errors.New("remote client config already exists on the gateway. it may have been created by another user with this same remote client machine")
 				slog.Error("failed to create extclient", "user", userName, "error", err)
 				slog.Error("failed to create extclient", "user", userName, "error", err)