Browse Source

Fix forgotten changes

T. Meissner 7 months 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():
13 13
     if current_user.is_authenticated:
14 14
         current_user.ping()
15 15
         if not current_user.confirmed \
16
+                and request.endpoint \
16 17
                 and request.blueprint != 'auth' \
17 18
                 and request.endpoint != 'static':
18 19
             return redirect(url_for('auth.unconfirmed'))

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

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

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

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