summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alex@spline.inf.fu-berlin.de>2020-09-02 02:48:19 +0200
committerAlexander Sulfrian <alex@spline.inf.fu-berlin.de>2020-09-02 15:22:16 +0200
commite9275479f8fc699bac010688273d7348508bfe4e (patch)
treea807618dea2907afeaffbf923256524e04b1760b
parent802b2c541c9364e8e6bceeb57c7e0556f1b2d442 (diff)
downloadwekan-e9275479f8fc699bac010688273d7348508bfe4e.tar.gz
wekan-e9275479f8fc699bac010688273d7348508bfe4e.tar.bz2
wekan-e9275479f8fc699bac010688273d7348508bfe4e.zip
Accounts: Disable signUp and forgot password
-rw-r--r--client/components/users/userHeader.jade13
-rw-r--r--config/accounts.js54
2 files changed, 8 insertions, 59 deletions
diff --git a/client/components/users/userHeader.jade b/client/components/users/userHeader.jade
index 29859e01..66d11468 100644
--- a/client/components/users/userHeader.jade
+++ b/client/components/users/userHeader.jade
@@ -25,15 +25,10 @@ template(name="memberMenuPopup")
a.js-change-avatar
i.fa.fa-picture-o
| {{_ 'edit-avatar'}}
- unless isSandstorm
- li
- a.js-change-password
- i.fa.fa-key
- | {{_ 'changePasswordPopup-title'}}
- li
- a.js-change-language
- i.fa.fa-flag
- | {{_ 'changeLanguagePopup-title'}}
+ li
+ a.js-change-language
+ i.fa.fa-flag
+ | {{_ 'changeLanguagePopup-title'}}
if currentUser.isAdmin
li
a.js-go-setting(href="{{pathFor 'setting'}}")
diff --git a/config/accounts.js b/config/accounts.js
index b19c12b9..4964adee 100644
--- a/config/accounts.js
+++ b/config/accounts.js
@@ -25,9 +25,10 @@ AccountsTemplates.configure({
defaultLayout: 'userFormsLayout',
defaultContentRegion: 'content',
confirmPassword: false,
- enablePasswordChange: true,
- sendVerificationEmail: true,
- showForgotPasswordLink: true,
+ enablePasswordChange: false,
+ sendVerificationEmail: false,
+ showForgotPasswordLink: false,
+ hideSignUpLink: true,
onLogoutHook() {
const homePage = 'home';
if (FlowRouter.getRouteName() === homePage) {
@@ -40,51 +41,4 @@ AccountsTemplates.configure({
[
'signIn',
- 'signUp',
- 'resetPwd',
- 'forgotPwd',
- 'enrollAccount',
].forEach(routeName => AccountsTemplates.configureRoute(routeName));
-
-// We display the form to change the password in a popup window that already
-// have a title, so we unset the title automatically displayed by useraccounts.
-AccountsTemplates.configure({
- texts: {
- title: {
- changePwd: '',
- },
- },
-});
-
-AccountsTemplates.configureRoute('changePwd', {
- redirect() {
- // XXX We should emit a notification once we have a notification system.
- // Currently the user has no indication that his modification has been
- // applied.
- Popup.back();
- },
-});
-
-if (Meteor.isServer) {
- [
- 'resetPassword-subject',
- 'resetPassword-text',
- 'verifyEmail-subject',
- 'verifyEmail-text',
- 'enrollAccount-subject',
- 'enrollAccount-text',
- ].forEach(str => {
- const [templateName, field] = str.split('-');
- Accounts.emailTemplates[templateName][field] = (user, url) => {
- return TAPi18n.__(
- `email-${str}`,
- {
- url,
- user: user.getName(),
- siteName: Accounts.emailTemplates.siteName,
- },
- user.getLanguage(),
- );
- };
- });
-}