Skip to content

Commit 888025c

Browse files
bpiraeusneolynx
authored andcommitted
minor cleanup based on make check
1 parent b2e0e68 commit 888025c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

api/auth.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func Authorize(username string, password string) (ok bool) {
2020
default:
2121
return false
2222
}
23-
if ok != true {
23+
if !ok {
2424
return false
2525
}
2626
}
@@ -67,7 +67,7 @@ func getGroups(c *gin.Context, username string) {
6767

6868
var groups []string
6969
config := context.Config()
70-
dn := fmt.Sprintf("%s", config.Auth.LdapDN)
70+
dn := config.Auth.LdapDN
7171
session := sessions.Default(c)
7272
// connect to ldap server
7373
server := fmt.Sprintf("%s", config.Auth.Server)
@@ -94,7 +94,6 @@ func getGroups(c *gin.Context, username string) {
9494
groups = append(groups, fmt.Sprintf("%s,", value))
9595
}
9696
session.Set("Groups", groups)
97-
return
9897
}
9998

10099
func checkGroup(c *gin.Context, ldgroup string) bool {

0 commit comments

Comments
 (0)