Browse Source

Fix forgotten changes

master
T. Meissner 6 years ago
parent
commit
468243cddb
3 changed files with 3 additions and 2 deletions
  1. +1
    -0
      app/auth/views.py
  2. +1
    -1
      app/main/__init__.py
  3. +1
    -1
      app/templates/base.html

+ 1
- 0
app/auth/views.py View File

@ -13,6 +13,7 @@ def before_request():
if current_user.is_authenticated: if current_user.is_authenticated:
current_user.ping() current_user.ping()
if not current_user.confirmed \ if not current_user.confirmed \
and request.endpoint \
and request.blueprint != 'auth' \ and request.blueprint != 'auth' \
and request.endpoint != 'static': and request.endpoint != 'static':
return redirect(url_for('auth.unconfirmed')) return redirect(url_for('auth.unconfirmed'))


+ 1
- 1
app/main/__init__.py View File

@ -8,6 +8,6 @@ from . import views, errors
from ..models import Permission from ..models import Permission
@main.context_processor
@main.app_context_processor
def inject_permissions(): def inject_permissions():
return dict(Permission=Permission) return dict(Permission=Permission)

+ 1
- 1
app/templates/base.html View File

@ -30,7 +30,7 @@
{% endif %} {% endif %}
</ul> </ul>
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
{% if current_user.is_authenticated and current_user.can(Permission.MODERATE) %}
{% if current_user.can(Permission.MODERATE) %}
<li><a href="{{ url_for('main.moderate') }}">Moderate Comments</a></li> <li><a href="{{ url_for('main.moderate') }}">Moderate Comments</a></li>
{% endif %} {% endif %}
{% if current_user.is_authenticated %} {% if current_user.is_authenticated %}


Loading…
Cancel
Save