mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 07:50:12 +01:00
Remove SMTP settings from Admin Panel, because they
are set in environment variable settings like source/snap/docker already, and password was exposed in plain text. Thanks to xet7 ! Closes #1783
This commit is contained in:
parent
c0ddecb2ee
commit
a8f41f7994
2 changed files with 10 additions and 37 deletions
|
|
@ -55,40 +55,6 @@ template(name="general")
|
|||
|
||||
template(name='email')
|
||||
ul#email-setting.setting-detail
|
||||
li.smtp-form
|
||||
.title {{_ 'smtp-host'}}
|
||||
.description {{_ 'smtp-host-description'}}
|
||||
.form-group
|
||||
input.form-control#mail-server-host(type="text", placeholder="smtp.domain.com" value="{{currentSetting.mailServer.host}}")
|
||||
li.smtp-form
|
||||
.title {{_ 'smtp-port'}}
|
||||
.description {{_ 'smtp-port-description'}}
|
||||
.form-group
|
||||
input.form-control#mail-server-port(type="text", placeholder="25" value="{{currentSetting.mailServer.port}}")
|
||||
li.smtp-form
|
||||
.title {{_ 'smtp-username'}}
|
||||
.form-group
|
||||
input.form-control#mail-server-username(type="text", placeholder="{{_ 'username'}}" value="{{currentSetting.mailServer.username}}")
|
||||
li.smtp-form
|
||||
.title {{_ 'smtp-password'}}
|
||||
.form-group
|
||||
input.form-control#mail-server-password(type="text", placeholder="{{_ 'password'}}" value="{{currentSetting.mailServer.password}}")
|
||||
li.smtp-form
|
||||
.title {{_ 'smtp-tls'}}
|
||||
.form-group
|
||||
a.flex.js-toggle-tls
|
||||
.materialCheckBox#mail-server-tls(class="{{#if currentSetting.mailServer.enableTLS}}is-checked{{/if}}")
|
||||
|
||||
span {{_ 'smtp-tls-description'}}
|
||||
|
||||
li.smtp-form
|
||||
.title {{_ 'send-from'}}
|
||||
.form-group
|
||||
input.form-control#mail-server-from(type="email", placeholder="no-reply@domain.com" value="{{currentSetting.mailServer.from}}")
|
||||
|
||||
li
|
||||
button.js-save.primary {{_ 'save'}}
|
||||
|
||||
li
|
||||
button.js-send-smtp-test-email.primary {{_ 'send-smtp-test'}}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ BlazeComponent.extendComponent({
|
|||
setLoading(w) {
|
||||
this.loading.set(w);
|
||||
},
|
||||
|
||||
/*
|
||||
checkField(selector) {
|
||||
const value = $(selector).val();
|
||||
if (!value || value.trim() === '') {
|
||||
|
|
@ -30,7 +30,7 @@ BlazeComponent.extendComponent({
|
|||
return value;
|
||||
}
|
||||
},
|
||||
|
||||
*/
|
||||
currentSetting() {
|
||||
return Settings.findOne();
|
||||
},
|
||||
|
|
@ -55,9 +55,11 @@ BlazeComponent.extendComponent({
|
|||
$('.invite-people').slideDown();
|
||||
}
|
||||
},
|
||||
/*
|
||||
toggleTLS() {
|
||||
$('#mail-server-tls').toggleClass('is-checked');
|
||||
},
|
||||
*/
|
||||
switchMenu(event) {
|
||||
const target = $(event.target);
|
||||
if (!target.hasClass('active')) {
|
||||
|
|
@ -104,6 +106,7 @@ BlazeComponent.extendComponent({
|
|||
}
|
||||
},
|
||||
|
||||
/*
|
||||
saveMailServerInfo() {
|
||||
this.setLoading(true);
|
||||
$('li').removeClass('has-error');
|
||||
|
|
@ -128,7 +131,7 @@ BlazeComponent.extendComponent({
|
|||
}
|
||||
|
||||
},
|
||||
|
||||
*/
|
||||
sendSMTPTestEmail() {
|
||||
Meteor.call('sendSMTPTestEmail', (err, ret) => {
|
||||
if (!err && ret) { /* eslint-disable no-console */
|
||||
|
|
@ -148,11 +151,15 @@ BlazeComponent.extendComponent({
|
|||
events() {
|
||||
return [{
|
||||
'click a.js-toggle-registration': this.toggleRegistration,
|
||||
/*
|
||||
'click a.js-toggle-tls': this.toggleTLS,
|
||||
*/
|
||||
'click a.js-setting-menu': this.switchMenu,
|
||||
'click a.js-toggle-board-choose': this.checkBoard,
|
||||
'click button.js-email-invite': this.inviteThroughEmail,
|
||||
/*
|
||||
'click button.js-save': this.saveMailServerInfo,
|
||||
*/
|
||||
'click button.js-send-smtp-test-email': this.sendSMTPTestEmail,
|
||||
}];
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue