diff --git a/client/css/password-reset.styl b/client/css/password-reset.styl
new file mode 100644
index 00000000..47e32f3f
--- /dev/null
+++ b/client/css/password-reset.styl
@@ -0,0 +1,2 @@
+#password-reset
+ max-width: 30em
diff --git a/client/html/login.tpl b/client/html/login.tpl
index 8ccc439d..186a5489 100644
--- a/client/html/login.tpl
+++ b/client/html/login.tpl
@@ -30,9 +30,7 @@
Password reset
-
+
+
+
+
+
+ <% } else { %>
+
We do not support automatic password resetting.
+ <% if (ctx.contactEmail) { %>
+
Please send an e-mail to <%- ctx.contactEmail %> to go through a manual procedure.
+ <% } %>
+ <% } %>
diff --git a/client/js/views/password_reset_view.js b/client/js/views/password_reset_view.js
index 38ac719b..25409c77 100644
--- a/client/js/views/password_reset_view.js
+++ b/client/js/views/password_reset_view.js
@@ -1,5 +1,6 @@
'use strict';
+const config = require('../config.js');
const events = require('../events.js');
const views = require('../util/views.js');
@@ -10,7 +11,10 @@ class PasswordResetView extends events.EventTarget {
super();
this._hostNode = document.getElementById('content-holder');
- views.replaceContent(this._hostNode, template());
+ views.replaceContent(this._hostNode, template({
+ canSendMails: config.canSendMails,
+ contactEmail: config.contactEmail,
+ }));
views.syncScrollPosition();
views.decorateValidator(this._formNode);
diff --git a/config.yaml.dist b/config.yaml.dist
index 9d50e50c..3b00d0eb 100644
--- a/config.yaml.dist
+++ b/config.yaml.dist
@@ -25,12 +25,18 @@ thumbnails:
post_width: 300
post_height: 300
-# used to send password reminders
+
+# used to send password reset e-mails
smtp:
host: # example: localhost
port: # example: 25
user: # example: bot
pass: # example: groovy123
+ # host can be left empty, in which case it is recommended to fill contactEmail.
+
+
+contactEmail: # example: bob@example.com. Meant for manual password reset procedures
+
# used for reverse image search
elasticsearch:
@@ -38,15 +44,16 @@ elasticsearch:
port: 9200
index: szurubooru
+
limits:
users_per_page: 20
posts_per_page: 40
max_comment_length: 5000
+
tag_name_regex: ^\S+$
tag_category_name_regex: ^[^\s%+#/]+$
-default_rank: regular
# don't change these, unless you want to annoy people. if you do customize
# them though, make sure to update the instructions in the registration form
@@ -54,6 +61,9 @@ default_rank: regular
password_regex: '^.{5,}$'
user_name_regex: '^[a-zA-Z0-9_-]{1,32}$'
+default_rank: regular
+
+
privileges:
'users:create': anonymous
'users:list': regular