Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Commit

Permalink
Fix warning message for invalid groups
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiemcmichael authored and Bruno Oliveira da Silva committed Dec 10, 2018
1 parent 0c7fe8b commit 91f6fdc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion middleware.go
Expand Up @@ -316,7 +316,7 @@ func (r *oauthProxy) admissionMiddleware(resource *Resource) func(http.Handler)

// @step: check if we have any groups, the groups are there
if !hasAccess(resource.Groups, user.groups, false) {
r.log.Warn("access denied, invalid roles",
r.log.Warn("access denied, invalid groups",
zap.String("access", "denied"),
zap.String("email", user.email),
zap.String("resource", resource.URL),
Expand Down
3 changes: 2 additions & 1 deletion session.go
Expand Up @@ -52,7 +52,8 @@ func (r *oauthProxy) getIdentity(req *http.Request) (*userContext, error) {
zap.String("id", user.id),
zap.String("name", user.name),
zap.String("email", user.email),
zap.String("roles", strings.Join(user.roles, ",")))
zap.String("roles", strings.Join(user.roles, ",")),
zap.String("groups", strings.Join(user.groups, ",")))

return user, nil
}
Expand Down

0 comments on commit 91f6fdc

Please sign in to comment.