diff --git a/README.md b/README.md index 5567511..752713b 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,7 @@ The following code has been tested with Debian 8, it should work on Ubuntu as we * `gitea_disable_gravatar`: Do you want to disable Gravatar ? (privacy and so on) (true/false) * `gitea_offline_mode`: Same but for disabling CDNs for frontend assets (true/false) * `gitea_disable_registration`: Do you want to disable user registration ? (true/false) +* `gitea_register_email_confirm`: Enable this to ask for mail confirmation of registration. Requires `gitea_mailer_enabled` to be enabled (Default: `false`) * `gitea_only_allow_external_registration`: Do you want to force registration only using third-party services ? (true/false) * `gitea_show_registration_button`: Do you want to show the registration button? (true/false) * `gitea_require_signin`: Do you require a signin to see repo's (even public ones) ? (true/false) @@ -123,6 +124,7 @@ The following code has been tested with Debian 8, it should work on Ubuntu as we * `gitea_mailer_user`: SMTP server username * `gitea_mailer_password`: SMTP server password * `gitea_mailer_from`: Sender mail address +* `gitea_subject_prefix`: Prefix to be placed before e-mail subject lines (Default: ``) * `gitea_enable_notify_mail`: Whether e-mail should be send to watchers of a repository when something happens. Default: `false` * `gitea_mail_default`: Default configuration for email notifications for users (user configurable). Options: enabled, onmention, disable (Default: `onmention` ) * `gitea_autowatch_new_repo`: Enable this to let all organisation users watch new repos when they are created (Default: `false`) diff --git a/defaults/main.yml b/defaults/main.yml index 7757cb4..17e26a5 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -51,6 +51,7 @@ gitea_disable_git_hooks: true gitea_show_user_email: false gitea_disable_gravatar: true gitea_disable_registration: false +gitea_register_email_confirm: false gitea_show_registration_button: true gitea_require_signin: true gitea_enable_captcha: true @@ -70,6 +71,7 @@ gitea_mailer_host: localhost:25 gitea_mailer_from: noreply@your.domain gitea_mailer_user: "" gitea_mailer_password: "" +gitea_subject_prefix: "" gitea_mailer_type: smtp gitea_log_systemd: false diff --git a/templates/gitea.ini.j2 b/templates/gitea.ini.j2 index 2146923..5c5319b 100644 --- a/templates/gitea.ini.j2 +++ b/templates/gitea.ini.j2 @@ -115,7 +115,8 @@ DISABLE_GIT_HOOKS = {{ gitea_disable_git_hooks | ternary('true', 'false') }} [service] ; Disallow registration, only allow admins to create accounts. -DISABLE_REGISTRATION = {{ gitea_disable_registration }} +DISABLE_REGISTRATION = {{ gitea_disable_registration }} +REGISTER_EMAIL_CONFIRM = {{ gitea_register_email_confirm }} ; User must sign in to view anything. REQUIRE_SIGNIN_VIEW = {{ gitea_require_signin | ternary('true', 'false') }} ; Enable captcha validation for registration @@ -158,6 +159,7 @@ USER = {{ gitea_mailer_user }} PASSWD = {{ gitea_mailer_password }} ; Send mails as plain text SEND_AS_PLAIN_TEXT = false +SUBJECT_PREFIX = {{ gitea_subject_prefix }} ; Set Mailer Type (either SMTP, sendmail or dummy to just send to the log) MAILER_TYPE = {{ gitea_mailer_type }} ; Specify an alternative sendmail binary