|
@@ -16,7 +16,7 @@ import (
|
|
|
func UserHandlers(r *mux.Router) {
|
|
|
r.HandleFunc("/api/users/{username}/remote_access_gw/{remote_access_gateway_id}", logic.SecurityCheck(true, http.HandlerFunc(attachUserToRemoteAccessGw))).Methods(http.MethodPost)
|
|
|
r.HandleFunc("/api/users/{username}/remote_access_gw/{remote_access_gateway_id}", logic.SecurityCheck(true, http.HandlerFunc(removeUserFromRemoteAccessGW))).Methods(http.MethodDelete)
|
|
|
- r.HandleFunc("/api/users/{username}/remote_access_gw", logic.SecurityCheck(false, logic.ContinueIfUserMatch(http.HandlerFunc(getUserRemoteAccessGws)))).Methods(http.MethodPost)
|
|
|
+ r.HandleFunc("/api/users/{username}/remote_access_gw", logic.SecurityCheck(false, logic.ContinueIfUserMatch(http.HandlerFunc(getUserRemoteAccessGws)))).Methods(http.MethodGet)
|
|
|
r.HandleFunc("/api/users/ingress/{ingress_id}", logic.SecurityCheck(true, http.HandlerFunc(ingressGatewayUsers))).Methods(http.MethodGet)
|
|
|
}
|
|
|
|
|
@@ -148,6 +148,8 @@ func getUserRemoteAccessGws(w http.ResponseWriter, r *http.Request) {
|
|
|
logic.ReturnErrorResponse(w, r, logic.FormatError(errors.New("required params username"), "badrequest"))
|
|
|
return
|
|
|
}
|
|
|
+ remoteAccessClientID := r.URL.Query().Get("remote_access_clientid")
|
|
|
+ fmt.Println("##### REMOTE CLIENT ID: ", remoteAccessClientID)
|
|
|
var req models.UserRemoteGwsReq
|
|
|
|
|
|
err := json.NewDecoder(r.Body).Decode(&req)
|