Fix recently-introduced logical issues around invitations

* metasrht/templates/register.html: Without the fix, even users with
an invitation would be told "Registration is currently closed."

* metasrht/templates/tabs.html: The invites tab should be visible when
registration is closed, not when open.
This commit is contained in:
Amin Bandali 2020-08-06 18:12:16 -04:00 committed by Drew DeVault
parent 169c7ec869
commit 6e51fdd5f5
2 changed files with 2 additions and 2 deletions

View File

@ -17,7 +17,7 @@
<p>Registration is disabled because sr.ht authentication is managed by a
different service. Please contact the system administrator for further
information.</p>
{% elif allow_registration() %}
{% elif allow_registration() or invite_hash %}
<div class="row">
<div class="col-md-10 offset-md-1">
{% include "blurb.html" %}

View File

@ -28,7 +28,7 @@
{% endif %}
</li>
{% endif %}
{% if allow_registration() %}
{% if not allow_registration() %}
<li class="nav-item invite-tab">
{{ link("/invites", "invites ({})".format(current_user.invites)) }}
</li>