mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-02 11:36:05 +01:00
(refs #896)Add description and migration for separation of notification and SMTP configuration
This commit is contained in:
@@ -24,7 +24,7 @@ trait SystemSettingsControllerBase extends ControllerBase {
|
||||
"activityLogLimit" -> trim(label("Limit of activity logs", optional(number()))),
|
||||
"ssh" -> trim(label("SSH access", boolean())),
|
||||
"sshPort" -> trim(label("SSH port", optional(number()))),
|
||||
"useSMTP" -> trim(label("SMTP", boolean())),
|
||||
"useSMTP" -> trim(label("SMTP", boolean())),
|
||||
"smtp" -> optionalIfNotChecked("useSMTP", mapping(
|
||||
"host" -> trim(label("SMTP Host", text(required))),
|
||||
"port" -> trim(label("SMTP Port", optional(number()))),
|
||||
|
||||
@@ -21,6 +21,15 @@ object AutoUpdate {
|
||||
* The history of versions. A head of this sequence is the current BitBucket version.
|
||||
*/
|
||||
val versions = Seq(
|
||||
new Version(3, 7) with SystemSettingsService {
|
||||
override def update(conn: Connection, cl: ClassLoader): Unit = {
|
||||
super.update(conn, cl)
|
||||
val settings = loadSystemSettings()
|
||||
if(settings.notification){
|
||||
saveSystemSettings(settings.copy(useSMTP = true))
|
||||
}
|
||||
}
|
||||
},
|
||||
new Version(3, 6),
|
||||
new Version(3, 5),
|
||||
new Version(3, 4),
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
<fieldset>
|
||||
<label class="checkbox">
|
||||
<input type="checkbox" id="useSMTP" name="useSMTP" @if(settings.useSMTP){ checked}/>
|
||||
use SMTP
|
||||
SMTP
|
||||
</label>
|
||||
</fieldset>
|
||||
<div class="form-horizontal useSMTP">
|
||||
@@ -288,6 +288,9 @@
|
||||
<input type="text" id="fromName" name="smtp.fromName" value="@settings.smtp.map(_.fromName)"/>
|
||||
</div>
|
||||
</div>
|
||||
<p class="muted">
|
||||
Enable notification not only SMTP configuration if you want to send nitification email.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user