MCPcopy Create free account
hub / github.com/gogs/gogs / EditAuthSource

Function EditAuthSource

internal/route/admin/auths.go:191–208  ·  view source on GitHub ↗
(c *context.Context)

Source from the content-addressed store, hash-verified

189}
190
191func EditAuthSource(c *context.Context) {
192 c.Title("admin.auths.edit")
193 c.PageIs("Admin")
194 c.PageIs("AdminAuthentications")
195
196 c.Data["SecurityProtocols"] = securityProtocols
197 c.Data["SMTPAuths"] = smtp.AuthTypes
198
199 source, err := database.Handle.LoginSources().GetByID(c.Req.Context(), c.ParamsInt64(":authid"))
200 if err != nil {
201 c.Error(err, "get login source by ID")
202 return
203 }
204 c.Data["Source"] = source
205 c.Data["HasTLS"] = source.Provider.HasTLS()
206
207 c.Success(tmplAdminAuthEdit)
208}
209
210func EditAuthSourcePost(c *context.Context, f form.Authentication) {
211 c.Title("admin.auths.edit")

Callers

nothing calls this directly

Calls 7

TitleMethod · 0.80
PageIsMethod · 0.80
LoginSourcesMethod · 0.80
SuccessMethod · 0.80
GetByIDMethod · 0.65
HasTLSMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected