summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorlkisme <lkisme@me.com>2017-02-24 22:10:38 +0800
committerlkisme <lkisme@me.com>2017-02-24 22:10:38 +0800
commit1dfb6ef477dba4d0faf4bf86026647f43fb2f5f6 (patch)
tree2c97395901ac5789975a65d5efc6eaf0e37c1e5d /config
parent29fdfb9c886f1a906a27398fd546ad6cdb929ff9 (diff)
downloadwekan-1dfb6ef477dba4d0faf4bf86026647f43fb2f5f6.tar.gz
wekan-1dfb6ef477dba4d0faf4bf86026647f43fb2f5f6.tar.bz2
wekan-1dfb6ef477dba4d0faf4bf86026647f43fb2f5f6.zip
Admin panel:
Only invited user can register in strict mode, Set mail server in admin panel, Switch strict mode in admin panel, Invite people to system in admin panel
Diffstat (limited to 'config')
-rw-r--r--config/accounts.js15
-rw-r--r--config/router.js10
2 files changed, 21 insertions, 4 deletions
diff --git a/config/accounts.js b/config/accounts.js
index 9ab26b33..51c0f49e 100644
--- a/config/accounts.js
+++ b/config/accounts.js
@@ -1,12 +1,21 @@
const passwordField = AccountsTemplates.removeField('password');
const emailField = AccountsTemplates.removeField('email');
+
AccountsTemplates.addFields([{
_id: 'username',
type: 'text',
displayName: 'username',
required: true,
minLength: 2,
-}, emailField, passwordField]);
+}, emailField, passwordField, {
+ _id: 'invitationcode',
+ type: 'text',
+ displayName: 'Invitation Code',
+ required: false,
+ minLength: 6,
+ errStr: 'Invitation code doesn\'t exist',
+ template: 'invitationCode',
+}]);
AccountsTemplates.configure({
defaultLayout: 'userFormsLayout',
@@ -48,9 +57,6 @@ AccountsTemplates.configureRoute('changePwd', {
});
if (Meteor.isServer) {
- if (process.env.MAIL_FROM) {
- Accounts.emailTemplates.from = process.env.MAIL_FROM;
- }
['resetPassword-subject', 'resetPassword-text', 'verifyEmail-subject', 'verifyEmail-text', 'enrollAccount-subject', 'enrollAccount-text'].forEach((str) => {
const [templateName, field] = str.split('-');
@@ -63,3 +69,4 @@ if (Meteor.isServer) {
};
});
}
+
diff --git a/config/router.js b/config/router.js
index 7194621b..f136f8cc 100644
--- a/config/router.js
+++ b/config/router.js
@@ -99,6 +99,16 @@ FlowRouter.route('/import', {
},
});
+FlowRouter.route('/setting', {
+ name: 'setting',
+ action() {
+ BlazeLayout.render('defaultLayout', {
+ headerBar: 'settingHeaderBar',
+ content: 'setting',
+ });
+ },
+});
+
FlowRouter.notFound = {
action() {
BlazeLayout.render('defaultLayout', { content: 'notFound' });