diff options
-rw-r--r-- | newspipe/templates/login.html | 2 | ||||
-rw-r--r-- | newspipe/web/views/session_mgmt.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/newspipe/templates/login.html b/newspipe/templates/login.html index 5d936d18..b9952309 100644 --- a/newspipe/templates/login.html +++ b/newspipe/templates/login.html @@ -19,7 +19,7 @@ <div class="alert alert-warning" role="alert">{{ message }}</div> {% endfor %} {{ form.submit(class_="btn btn-primary") }} - <a href="/signup" class="btn btn-info">{{ _('Sign up') }}</a> + {% if self_registration %}<a href="/signup" class="btn btn-info">{{ _('Sign up') }}</a>{% endif %} </form> </div> </div> diff --git a/newspipe/web/views/session_mgmt.py b/newspipe/web/views/session_mgmt.py index 0e8329e5..0154503a 100644 --- a/newspipe/web/views/session_mgmt.py +++ b/newspipe/web/views/session_mgmt.py @@ -84,7 +84,7 @@ def login(): if request.method == "POST" and form.validate(): # fixes an issue in flask-wtf login_user_bundle(form.user) return form.redirect("home") - return render_template("login.html", form=form) + return render_template("login.html", form=form, self_registration=application.config["SELF_REGISTRATION"]) @current_app.route("/logout") |