@@ -16,11 +16,11 @@ import (
1616 "code.gitea.io/gitea/modules/auth/pam"
1717 "code.gitea.io/gitea/modules/base"
1818 "code.gitea.io/gitea/modules/context"
19- auth "code.gitea.io/gitea/modules/forms"
2019 "code.gitea.io/gitea/modules/log"
2120 "code.gitea.io/gitea/modules/setting"
2221 "code.gitea.io/gitea/modules/util"
2322 "code.gitea.io/gitea/modules/web"
23+ "code.gitea.io/gitea/services/forms"
2424
2525 "xorm.io/xorm/convert"
2626)
@@ -113,7 +113,7 @@ func NewAuthSource(ctx *context.Context) {
113113 ctx .HTML (http .StatusOK , tplAuthNew )
114114}
115115
116- func parseLDAPConfig (form auth .AuthenticationForm ) * models.LDAPConfig {
116+ func parseLDAPConfig (form forms .AuthenticationForm ) * models.LDAPConfig {
117117 var pageSize uint32
118118 if form .UsePagedSearch {
119119 pageSize = uint32 (form .SearchPageSize )
@@ -150,7 +150,7 @@ func parseLDAPConfig(form auth.AuthenticationForm) *models.LDAPConfig {
150150 }
151151}
152152
153- func parseSMTPConfig (form auth .AuthenticationForm ) * models.SMTPConfig {
153+ func parseSMTPConfig (form forms .AuthenticationForm ) * models.SMTPConfig {
154154 return & models.SMTPConfig {
155155 Auth : form .SMTPAuth ,
156156 Host : form .SMTPHost ,
@@ -161,7 +161,7 @@ func parseSMTPConfig(form auth.AuthenticationForm) *models.SMTPConfig {
161161 }
162162}
163163
164- func parseOAuth2Config (form auth .AuthenticationForm ) * models.OAuth2Config {
164+ func parseOAuth2Config (form forms .AuthenticationForm ) * models.OAuth2Config {
165165 var customURLMapping * oauth2.CustomURLMapping
166166 if form .Oauth2UseCustomURL {
167167 customURLMapping = & oauth2.CustomURLMapping {
@@ -183,7 +183,7 @@ func parseOAuth2Config(form auth.AuthenticationForm) *models.OAuth2Config {
183183 }
184184}
185185
186- func parseSSPIConfig (ctx * context.Context , form auth .AuthenticationForm ) (* models.SSPIConfig , error ) {
186+ func parseSSPIConfig (ctx * context.Context , form forms .AuthenticationForm ) (* models.SSPIConfig , error ) {
187187 if util .IsEmptyString (form .SSPISeparatorReplacement ) {
188188 ctx .Data ["Err_SSPISeparatorReplacement" ] = true
189189 return nil , errors .New (ctx .Tr ("form.SSPISeparatorReplacement" ) + ctx .Tr ("form.require_error" ))
@@ -209,7 +209,7 @@ func parseSSPIConfig(ctx *context.Context, form auth.AuthenticationForm) (*model
209209
210210// NewAuthSourcePost response for adding an auth source
211211func NewAuthSourcePost (ctx * context.Context ) {
212- form := * web .GetForm (ctx ).(* auth .AuthenticationForm )
212+ form := * web .GetForm (ctx ).(* forms .AuthenticationForm )
213213 ctx .Data ["Title" ] = ctx .Tr ("admin.auths.new" )
214214 ctx .Data ["PageIsAdmin" ] = true
215215 ctx .Data ["PageIsAdminAuthentications" ] = true
@@ -316,7 +316,7 @@ func EditAuthSource(ctx *context.Context) {
316316
317317// EditAuthSourcePost response for editing auth source
318318func EditAuthSourcePost (ctx * context.Context ) {
319- form := * web .GetForm (ctx ).(* auth .AuthenticationForm )
319+ form := * web .GetForm (ctx ).(* forms .AuthenticationForm )
320320 ctx .Data ["Title" ] = ctx .Tr ("admin.auths.edit" )
321321 ctx .Data ["PageIsAdmin" ] = true
322322 ctx .Data ["PageIsAdminAuthentications" ] = true
0 commit comments