File tree Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Expand file tree Collapse file tree 2 files changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -443,6 +443,7 @@ lang_select_error = Select a language from the list.
443443username_been_taken = The username is already taken.
444444username_change_not_local_user = Non-local users are not allowed to change their username.
445445repo_name_been_taken = The repository name is already used.
446+ repository_force_private = Force Private is enabled: private repositories cannot be made public.
446447repository_files_already_exist = Files already exist for this repository. Contact the system administrator.
447448repository_files_already_exist.adopt = Files already exist for this repository and can only be Adopted.
448449repository_files_already_exist.delete = Files already exist for this repository. You must delete them.
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ func SettingsPost(ctx *context.Context) {
144144 visibilityChanged := repo .IsPrivate != form .Private
145145 // when ForcePrivate enabled, you could change public repo to private, but only admin users can change private to public
146146 if visibilityChanged && setting .Repository .ForcePrivate && ! form .Private && ! ctx .User .IsAdmin {
147- ctx .ServerError ( "Force Private enabled" , errors . New ( "cannot change private repository to public" ) )
147+ ctx .RenderWithErr ( ctx . Tr ( "form.repository_force_private" ), tplSettingsOptions , form )
148148 return
149149 }
150150
You can’t perform that action at this time.
0 commit comments