diff options
Diffstat (limited to 'routers')
-rw-r--r-- | routers/web/repo/setting.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/repo/setting.go b/routers/web/repo/setting.go index 81009cb393..a6b1219954 100644 --- a/routers/web/repo/setting.go +++ b/routers/web/repo/setting.go @@ -144,7 +144,7 @@ func SettingsPost(ctx *context.Context) { visibilityChanged := repo.IsPrivate != form.Private // when ForcePrivate enabled, you could change public repo to private, but only admin users can change private to public if visibilityChanged && setting.Repository.ForcePrivate && !form.Private && !ctx.User.IsAdmin { - ctx.ServerError("Force Private enabled", errors.New("cannot change private repository to public")) + ctx.RenderWithErr(ctx.Tr("form.repository_force_private"), tplSettingsOptions, form) return } |