1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-25 08:59:31 -05:00

wip: found backend for settings update

This commit is contained in:
Michael Jerger 2024-03-19 08:29:57 +01:00
parent 9dcdf8d828
commit 6901ae4b99

View file

@ -185,6 +185,16 @@ func SettingsPost(ctx *context.Context) {
ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success")) ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success"))
ctx.Redirect(repo.Link() + "/settings") ctx.Redirect(repo.Link() + "/settings")
case "federation":
if !setting.Federation.Enabled {
ctx.NotFound("", nil)
return
}
// TODO: Validate semicolon separation
// TODO: Validate Element isURL
// TODO: Validate Element denominates Repository
case "mirror": case "mirror":
if !setting.Mirror.Enabled || !repo.IsMirror || repo.IsArchived { if !setting.Mirror.Enabled || !repo.IsMirror || repo.IsArchived {
ctx.NotFound("", nil) ctx.NotFound("", nil)