File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff 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
10099func checkGroup (c * gin.Context , ldgroup string ) bool {
You can’t perform that action at this time.
0 commit comments