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 Aug 13, 2024
1 parent b2e0e68 commit 888025c
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 888025c

Please sign in to comment.