Ver Fonte

add user id check on extclient

abhishek9686 há 1 ano atrás
pai
commit
00838cab52
1 ficheiros alterados com 1 adições e 1 exclusões
  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 {
 			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
 				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)