From ef4297571fcd3f53b946585d86e8a9858063c4af Mon Sep 17 00:00:00 2001 From: bpiraeus Date: Mon, 14 Mar 2022 14:11:44 -0700 Subject: [PATCH] minor cleanup based on make check --- api/auth.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api/auth.go b/api/auth.go index 4b28b5efb..1a1827de0 100644 --- a/api/auth.go +++ b/api/auth.go @@ -20,7 +20,7 @@ func Authorize(username string, password string) (ok bool) { default: return false } - if ok != true { + if !ok { return false } } @@ -67,7 +67,7 @@ func getGroups(c *gin.Context, username string) { var groups []string config := context.Config() - dn := fmt.Sprintf("%s", config.Auth.LdapDN) + dn := config.Auth.LdapDN session := sessions.Default(c) // connect to ldap server server := fmt.Sprintf("%s", config.Auth.Server) @@ -94,7 +94,6 @@ func getGroups(c *gin.Context, username string) { groups = append(groups, fmt.Sprintf("%s,", value)) } session.Set("Groups", groups) - return } func checkGroup(c *gin.Context, ldgroup string) bool {