File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ func NewAuthSource(ctx *context.Context) {
9393 ctx .Data ["PageIsAdmin" ] = true
9494 ctx .Data ["PageIsAdminAuthentications" ] = true
9595
96- ctx .Data ["type" ] = auth .LDAP
96+ ctx .Data ["type" ] = auth .LDAP . Int ()
9797 ctx .Data ["CurrentTypeName" ] = auth .Names [auth .LDAP ]
9898 ctx .Data ["CurrentSecurityProtocol" ] = ldap .SecurityProtocolNames [ldap .SecurityProtocolUnencrypted ]
9999 ctx .Data ["smtp_auth" ] = "PLAIN"
@@ -112,7 +112,7 @@ func NewAuthSource(ctx *context.Context) {
112112 ctx .Data ["SSPIDefaultLanguage" ] = ""
113113
114114 // only the first as default
115- ctx .Data ["oauth2_provider" ] = oauth2providers [0 ]
115+ ctx .Data ["oauth2_provider" ] = oauth2providers [0 ]. Name
116116
117117 ctx .HTML (http .StatusOK , tplAuthNew )
118118}
Original file line number Diff line number Diff line change 1414 <div class= " inline required field {{if .Err_Type}}error{{end}}" >
1515 <label>{{.i18n.Tr " admin.auths.auth_type" }}</label>
1616 <div class= " ui selection type dropdown" >
17- <input type= " hidden" id= " auth_type" name= " type" value= " {{.type.Int }}" >
17+ <input type= " hidden" id= " auth_type" name= " type" value= " {{.type}}" >
1818 <div class= " text" >{{.CurrentTypeName }}</div>
1919 {{svg " octicon-triangle-down" 14 " dropdown icon" }}
2020 <div class= " menu" >
Original file line number Diff line number Diff line change 22 <div class= " inline required field" >
33 <label>{{.i18n.Tr " admin.auths.oauth2_provider" }}</label>
44 <div class= " ui selection type dropdown" >
5- <input type= " hidden" id= " oauth2_provider" name= " oauth2_provider" value= " {{.oauth2_provider.Name }}" >
6- <div class= " text" >{{.oauth2_provider.Name }}</div>
5+ <input type= " hidden" id= " oauth2_provider" name= " oauth2_provider" value= " {{.oauth2_provider}}" >
6+ <div class= " text" >{{.oauth2_provider }}</div>
77 {{svg " octicon-triangle-down" 14 " dropdown icon" }}
88 <div class= " menu" >
99 {{range .OAuth2Providers }}
You can’t perform that action at this time.
0 commit comments