Skip to content

Commit

Permalink
Fix linter issue
Browse files Browse the repository at this point in the history
Signed-off-by: Pradeep Mudlapur <[email protected]>
  • Loading branch information
mdpradeep committed Oct 20, 2023
1 parent 4cdfd0a commit 1eeb9b6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions connector/oidc/oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ type Config struct {
InsecureSkipEmailVerified bool `json:"insecureSkipEmailVerified"`

// InsecureEnableGroups enables groups claims. This is disabled by default until https://github.com/dexidp/dex/issues/1065 is resolved
InsecureEnableGroups bool `json:"insecureEnableGroups"`
AllowedGroups []string `json:"allowedGroups"`
InsecureEnableGroups bool `json:"insecureEnableGroups"`
AllowedGroups []string `json:"allowedGroups"`

// AcrValues (Authentication Context Class Reference Values) that specifies the Authentication Context Class Values
// within the Authentication Request that the Authorization Server is being requested to use for
Expand Down Expand Up @@ -431,9 +431,9 @@ func (c *oidcConnector) createIdentity(ctx context.Context, identity connector.I
}

// Validate that the user is part of allowedGroups
var accessAllowed = false
accessAllowed := false
if len(c.allowedGroups) > 0 {
for _,group := range c.allowedGroups {
for _, group := range c.allowedGroups {
groupPresent := slices.Contains(groups, group)
if groupPresent {
accessAllowed = true
Expand Down

0 comments on commit 1eeb9b6

Please sign in to comment.