Skip to content

Commit

Permalink
minor cleanup based on make check
Browse files Browse the repository at this point in the history
  • Loading branch information
bpiraeus authored and neolynx committed Oct 9, 2024
1 parent 4e48b0b commit ef42975
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions api/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func Authorize(username string, password string) (ok bool) {
default:
return false
}
if ok != true {
if !ok {
return false
}
}
Expand Down Expand Up @@ -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)
Expand All @@ -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 {
Expand Down

0 comments on commit ef42975

Please sign in to comment.