mirror of
https://github.com/plankanban/planka.git
synced 2025-12-21 01:11:26 +03:00
feat: Add ability to configure and test SMTP via UI
This commit is contained in:
@@ -11,20 +11,17 @@ module.exports = {
|
||||
type: 'ref',
|
||||
required: true,
|
||||
},
|
||||
user: {
|
||||
type: 'ref',
|
||||
},
|
||||
},
|
||||
|
||||
fn(inputs) {
|
||||
const data = {
|
||||
...inputs.record,
|
||||
version: sails.config.custom.version,
|
||||
};
|
||||
if (inputs.user && inputs.user.role === User.Roles.ADMIN) {
|
||||
data.activeUsersLimit = sails.config.custom.activeUsersLimit;
|
||||
if (sails.config.custom.smtpHost) {
|
||||
return _.omit(inputs.record, Config.SMTP_FIELD_NAMES);
|
||||
}
|
||||
|
||||
return data;
|
||||
if (inputs.record.smtpPassword) {
|
||||
return _.omit(inputs.record, 'smtpPassword');
|
||||
}
|
||||
|
||||
return inputs.record;
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user