mirror of
1
Fork 0

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
1 changed files with 10 additions and 0 deletions

View File

@ -185,6 +185,16 @@ func SettingsPost(ctx *context.Context) {
ctx.Flash.Success(ctx.Tr("repo.settings.update_settings_success"))
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":
if !setting.Mirror.Enabled || !repo.IsMirror || repo.IsArchived {
ctx.NotFound("", nil)