From 8e273ce093eba2214a8982600736cd04b68cc545 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Wed, 8 Oct 2025 20:31:22 -0700 Subject: [PATCH] fix --- options/locale/locale_en-US.ini | 52 ++++++--------- routers/install/install.go | 3 - templates/admin/config.tmpl | 15 ----- templates/admin/config_settings/service.tmpl | 68 ++++++++++---------- templates/install.tmpl | 18 ------ tests/mssql.ini.tmpl | 2 - tests/mysql.ini.tmpl | 2 - tests/pgsql.ini.tmpl | 2 - tests/sqlite.ini.tmpl | 2 - 9 files changed, 54 insertions(+), 110 deletions(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index c403270d4a..5ca90358d4 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -350,12 +350,6 @@ secret_key_failed = Failed to generate secret key: %v save_config_failed = Failed to save configuration: %v invalid_admin_setting = Administrator account setting is invalid: %v invalid_log_root_path = The log path is invalid: %v -default_keep_email_private = Hide Email Addresses by Default -default_keep_email_private_popup = Hide email addresses of new user accounts by default. -default_allow_create_organization = Allow Creation of Organizations by Default -default_allow_create_organization_popup = Allow new user accounts to create organizations by default. -default_enable_timetracking = Enable Time Tracking by Default -default_enable_timetracking_popup = Enable time tracking for new repositories by default. no_reply_address = Hidden Email Domain no_reply_address_helper = Domain name for users with a hidden email address. For example, the username 'joe' will be logged in Git as 'joe@noreply.example.org' if the hidden email domain is set to 'noreply.example.org'. password_algorithm = Password Hash Algorithm @@ -3377,36 +3371,30 @@ config.enable_captcha = Enable CAPTCHA config.active_code_lives = Active Code Lives config.reset_password_code_lives = Recover Account Code Expiry Time config.default_keep_email_private = Hide Email Addresses by Default +config.default_keep_email_private_desc = Each new user will get the value of this setting copied into their profile config.default_allow_create_organization = Allow Creation of Organizations by Default -config.enable_timetracking = Enable Time Tracking -config.default_enable_timetracking = Enable Time Tracking by Default +config.default_allow_create_organization_desc = Every new user will have rights set to create organizations depending on this setting +config.default_user_is_restricted = New user will be restricted by default +config.default_user_is_restricted_desc = Every new user will have restricted permissions depending on this setting +config.enable_time_tracking = Enable Time Tracking +config.default_enable_time_tracking = Enable Time Tracking by Default +config.default_enable_time_tracking_desc = Repositories will use time tracking by default depending on this setting config.default_allow_only_contributors_to_track_time = Let Only Contributors Track Time +config.default_allow_only_contributors_to_track_time_desc = Only users with write permissions can track time if this is true +config.default_enable_dependencies = Enable Issue Dependencies by Default +config.default_enable_dependencies_desc = Repositories will use dependencies by default depending on this setting +config.allow_cross_repository_dependencies = Allow Cross Repository Issue Dependencies +config.allow_cross_repository_dependencies_desc = Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting. +config.enable_user_heatmap = Enable User Heatmap +config.enable_user_heatmap_desc = Show a heatmap of user activity on user profiles +config.auto_watch_new_repos = Enable Auto Watch for New Repositories +config.auto_watch_new_repos_desc = When adding a repo to a team or creating a new repo all team members will watch the repo automatically if enabled +config.auto_watch_on_changes = Enable Auto Watch for Repositories Push +config.auto_watch_on_changes_desc = Make the user watch a repository When they commit for the first time +config.default_org_member_visible = Default Organization Member Visibility +config.default_org_member_visible_desc = True will make the membership of the users visible when added to the organisation config.no_reply_address = Hidden Email Domain config.default_visibility_organization = Default visibility for new Organizations -config.service_default_keep_email_private = Default value for KeepEmailPrivate -config.service_default_keep_email_private_desc = Each new user will get the value of this setting copied into their profile -config.service_default_allow_create_organization = Default value for AllowCreateOrganization -config.service_default_allow_create_organization_desc = Every new user will have rights set to create organizations depending on this setting -config.service_default_user_is_restricted = Default value for IsRestricted -config.service_default_user_is_restricted_desc = Every new user will have restricted permissions depending on this setting -config.service_enable_time_tracking = Enable Time Tracking -config.service_default_enable_time_tracking = Default value for EnableTimetracking -config.service_default_enable_time_tracking_desc = Repositories will use timetracking by default depending on this setting -config.service_default_enable_dependencies = Enable Issue Dependencies by Default -config.service_default_enable_dependencies_desc = Repositories will use dependencies by default depending on this setting -config.service_allow_cross_repository_dependencies = Allow Cross Repository Issue Dependencies -config.service_allow_cross_repository_dependencies_desc = Dependencies can be added from any repository where the user is granted access or only from the current repository depending on this setting. -config.service_default_allow_only_contributors_to_track_time = Default value for AllowOnlyContributorsToTrackTime -config.service_default_allow_only_contributors_to_track_time_desc = Only users with write permissions can track time if this is true -config.service_enable_user_heatmap = Enable User Heatmap -config.service_enable_user_heatmap_desc = Show a heatmap of user activity on user profiles -config.service_auto_watch_new_repos = Enable Auto Watch for New Repositories -config.service_auto_watch_new_repos_desc = When adding a repo to a team or creating a new repo all team members will watch the repo automatically if enabled -config.service_auto_watch_on_changes = Enable Auto Watch for Repositories Push -config.service_auto_watch_on_changes_desc = Make the user watch a repository When they commit for the first time -config.service_default_org_member_visible = Default value for DefaultOrgMemberVisible -config.service_default_org_member_visible_desc = True will make the membership of the users visible when added to the organisation - config.webhook_config = Webhook Configuration config.queue_length = Queue Length config.deliver_timeout = Deliver Timeout diff --git a/routers/install/install.go b/routers/install/install.go index c06b6dee25..c68b278641 100644 --- a/routers/install/install.go +++ b/routers/install/install.go @@ -440,9 +440,6 @@ func SubmitInstall(ctx *context.Context) { cfg.Section("service").Key("ALLOW_ONLY_EXTERNAL_REGISTRATION").SetValue(strconv.FormatBool(form.AllowOnlyExternalRegistration)) cfg.Section("service").Key("ENABLE_CAPTCHA").SetValue(strconv.FormatBool(form.EnableCaptcha)) cfg.Section("service").Key("REQUIRE_SIGNIN_VIEW").SetValue(strconv.FormatBool(form.RequireSignInView)) - cfg.Section("service").Key("DEFAULT_KEEP_EMAIL_PRIVATE").SetValue(strconv.FormatBool(form.DefaultKeepEmailPrivate)) - cfg.Section("service").Key("DEFAULT_ALLOW_CREATE_ORGANIZATION").SetValue(strconv.FormatBool(form.DefaultAllowCreateOrganization)) - cfg.Section("service").Key("DEFAULT_ENABLE_TIMETRACKING").SetValue(strconv.FormatBool(form.DefaultEnableTimetracking)) cfg.Section("service").Key("NO_REPLY_ADDRESS").SetValue(form.NoReplyAddress) cfg.Section("cron.update_checker").Key("ENABLED").SetValue(strconv.FormatBool(form.EnableUpdateChecker)) diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index 806347c720..f3f7c40eb9 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -149,25 +149,10 @@
{{svg (Iif .Service.EnableNotifyMail "octicon-check" "octicon-x")}}
{{ctx.Locale.Tr "admin.config.enable_captcha"}}
{{svg (Iif .Service.EnableCaptcha "octicon-check" "octicon-x")}}
-
{{ctx.Locale.Tr "admin.config.default_keep_email_private"}}
-
{{svg (Iif .Service.DefaultKeepEmailPrivate "octicon-check" "octicon-x")}}
-
{{ctx.Locale.Tr "admin.config.default_allow_create_organization"}}
-
{{svg (Iif .Service.DefaultAllowCreateOrganization "octicon-check" "octicon-x")}}
-
{{ctx.Locale.Tr "admin.config.enable_timetracking"}}
-
{{svg (Iif .Service.EnableTimetracking "octicon-check" "octicon-x")}}
- {{if .Service.EnableTimetracking}} -
{{ctx.Locale.Tr "admin.config.default_enable_timetracking"}}
-
{{svg (Iif .Service.DefaultEnableTimetracking "octicon-check" "octicon-x")}}
-
{{ctx.Locale.Tr "admin.config.default_allow_only_contributors_to_track_time"}}
-
{{svg (Iif .Service.DefaultAllowOnlyContributorsToTrackTime "octicon-check" "octicon-x")}}
- {{end}}
{{ctx.Locale.Tr "admin.config.default_visibility_organization"}}
{{.Service.DefaultOrgVisibility}}
-
{{ctx.Locale.Tr "admin.config.no_reply_address"}}
{{if .Service.NoReplyAddress}}{{.Service.NoReplyAddress}}{{else}}-{{end}}
-
{{ctx.Locale.Tr "admin.config.default_enable_dependencies"}}
-
{{svg (Iif .Service.DefaultEnableDependencies "octicon-check" "octicon-x")}}
{{ctx.Locale.Tr "admin.config.active_code_lives"}}
{{.Service.ActiveCodeLives}} {{ctx.Locale.Tr "tool.raw_minutes"}}
diff --git a/templates/admin/config_settings/service.tmpl b/templates/admin/config_settings/service.tmpl index 7a04ffd505..53c10d6ca4 100644 --- a/templates/admin/config_settings/service.tmpl +++ b/templates/admin/config_settings/service.tmpl @@ -3,86 +3,86 @@
-
{{ctx.Locale.Tr "admin.config.service_default_keep_email_private"}}
+
{{ctx.Locale.Tr "admin.config.default_keep_email_private"}}
-
+
-
{{ctx.Locale.Tr "admin.config.service_default_allow_create_organization"}}
+
{{ctx.Locale.Tr "admin.config.default_allow_create_organization"}}
-
+
-
{{ctx.Locale.Tr "admin.config.service_default_user_is_restricted"}}
+
{{ctx.Locale.Tr "admin.config.default_user_is_restricted"}}
-
+
-
{{ctx.Locale.Tr "admin.config.service_enable_time_tracking"}}
+
{{ctx.Locale.Tr "admin.config.enable_time_tracking"}}
-
+
-
{{ctx.Locale.Tr "admin.config.service_default_enable_time_tracking"}}
+
{{ctx.Locale.Tr "admin.config.default_enable_time_tracking"}}
-
+
-
{{ctx.Locale.Tr "admin.config.service_default_enable_dependencies"}}
+
{{ctx.Locale.Tr "admin.config.default_allow_only_contributors_to_track_time"}}
-
- -
-
-
-
{{ctx.Locale.Tr "admin.config.service_allow_cross_repository_dependencies"}}
-
-
- -
-
-
-
{{ctx.Locale.Tr "admin.config.service_default_allow_only_contributors_to_track_time"}}
-
-
+
-
{{ctx.Locale.Tr "admin.config.service_enable_user_heatmap"}}
+
{{ctx.Locale.Tr "admin.config.default_enable_dependencies"}}
-
+
+ +
+
+
+
{{ctx.Locale.Tr "admin.config.allow_cross_repository_dependencies"}}
+
+
+ +
+
+
+
{{ctx.Locale.Tr "admin.config.enable_user_heatmap"}}
+
+
-
{{ctx.Locale.Tr "admin.config.service_auto_watch_new_repos"}}
+
{{ctx.Locale.Tr "admin.config.auto_watch_new_repos"}}
-
+
-
{{ctx.Locale.Tr "admin.config.service_auto_watch_on_changes"}}
+
{{ctx.Locale.Tr "admin.config.auto_watch_on_changes"}}
-
+
-
{{ctx.Locale.Tr "admin.config.service_default_org_member_visible"}}
+
{{ctx.Locale.Tr "admin.config.default_org_member_visible"}}
-
+
diff --git a/templates/install.tmpl b/templates/install.tmpl index 0aec52f27b..99b1929186 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -257,24 +257,6 @@
-
-
- - -
-
-
-
- - -
-
-
-
- - -
-
diff --git a/tests/mssql.ini.tmpl b/tests/mssql.ini.tmpl index 42bf683a07..2fdd14062d 100644 --- a/tests/mssql.ini.tmpl +++ b/tests/mssql.ini.tmpl @@ -68,8 +68,6 @@ REGISTER_MANUAL_CONFIRM = false DISABLE_REGISTRATION = false ENABLE_CAPTCHA = false REQUIRE_SIGNIN_VIEW = false -DEFAULT_KEEP_EMAIL_PRIVATE = false -DEFAULT_ALLOW_CREATE_ORGANIZATION = true NO_REPLY_ADDRESS = noreply.example.org ENABLE_NOTIFY_MAIL = true diff --git a/tests/mysql.ini.tmpl b/tests/mysql.ini.tmpl index 7cef540d1d..e95d5f03f4 100644 --- a/tests/mysql.ini.tmpl +++ b/tests/mysql.ini.tmpl @@ -71,8 +71,6 @@ REGISTER_MANUAL_CONFIRM = false DISABLE_REGISTRATION = false ENABLE_CAPTCHA = false REQUIRE_SIGNIN_VIEW = false -DEFAULT_KEEP_EMAIL_PRIVATE = false -DEFAULT_ALLOW_CREATE_ORGANIZATION = true NO_REPLY_ADDRESS = noreply.example.org ENABLE_NOTIFY_MAIL = true diff --git a/tests/pgsql.ini.tmpl b/tests/pgsql.ini.tmpl index 13a5932608..b4978df9a5 100644 --- a/tests/pgsql.ini.tmpl +++ b/tests/pgsql.ini.tmpl @@ -69,8 +69,6 @@ REGISTER_MANUAL_CONFIRM = false DISABLE_REGISTRATION = false ENABLE_CAPTCHA = false REQUIRE_SIGNIN_VIEW = false -DEFAULT_KEEP_EMAIL_PRIVATE = false -DEFAULT_ALLOW_CREATE_ORGANIZATION = true NO_REPLY_ADDRESS = noreply.example.org ENABLE_NOTIFY_MAIL = true diff --git a/tests/sqlite.ini.tmpl b/tests/sqlite.ini.tmpl index 938f203633..2d72268eb9 100644 --- a/tests/sqlite.ini.tmpl +++ b/tests/sqlite.ini.tmpl @@ -69,8 +69,6 @@ ENABLE_NOTIFY_MAIL = true DISABLE_REGISTRATION = false ENABLE_CAPTCHA = false REQUIRE_SIGNIN_VIEW = false -DEFAULT_KEEP_EMAIL_PRIVATE = false -DEFAULT_ALLOW_CREATE_ORGANIZATION = true NO_REPLY_ADDRESS = noreply.example.org [picture]