mirror of
https://github.com/gravitl/netmaker.git
synced 2024-09-20 15:26:04 +08:00
add user id check on extclient
This commit is contained in:
parent
564bcfc04e
commit
00838cab52
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue