Skip to content

Commit

Permalink
fix sanity check errors
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Yang <ruiya@vmware.com>
  • Loading branch information
Rui Yang committed Feb 8, 2022
1 parent 7fbc100 commit aa82d4f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions connector/cf/cf.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
"sort"
"strings"
"time"
Expand Down Expand Up @@ -149,7 +149,7 @@ func newHTTPClient(rootCAs []string, insecureSkipVerify bool) (*http.Client, err

tlsConfig := tls.Config{RootCAs: pool, InsecureSkipVerify: insecureSkipVerify}
for _, rootCA := range rootCAs {
rootCABytes, err := ioutil.ReadFile(rootCA)
rootCABytes, err := os.ReadFile(rootCA)
if err != nil {
return nil, fmt.Errorf("failed to read root-ca: %v", err)
}
Expand Down Expand Up @@ -376,9 +376,9 @@ func (c *cfConnector) HandleCallback(s connector.Scopes, r *http.Request) (ident
return identity, fmt.Errorf("failed to fetch spaces for developer roles: %v", err)
}

spaces := append(developerSpaces, append(auditorSpaces, managerSpaces...)...)
developerSpaces = append(developerSpaces, append(auditorSpaces, managerSpaces...)...)

identity.Groups = getGroupsClaims(orgs, spaces)
identity.Groups = getGroupsClaims(orgs, developerSpaces)
}

if s.OfflineAccess {
Expand Down

0 comments on commit aa82d4f

Please sign in to comment.