mirror of
https://github.com/aljazceru/CTFd.git
synced 2026-02-09 00:04:21 +01:00
Fix Admin Panel link from deprecating session type
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
|
||||
<ul class="navbar-nav ml-md-auto d-block d-sm-flex d-md-flex">
|
||||
{% if authed() %}
|
||||
{% if type == 'admin' %}
|
||||
{% if is_admin() %}
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="{{ url_for('admin.view') }}">
|
||||
<span class="d-block" data-toggle="tooltip" data-placement="bottom" title="Admin Panel">
|
||||
|
||||
@@ -38,7 +38,7 @@ from CTFd.utils.plugins import (
|
||||
)
|
||||
from CTFd.utils.security.auth import login_user, logout_user, lookup_user_token
|
||||
from CTFd.utils.security.csrf import generate_nonce
|
||||
from CTFd.utils.user import authed, get_current_team, get_current_user, get_ip
|
||||
from CTFd.utils.user import authed, get_current_team, get_current_user, get_ip, is_admin
|
||||
|
||||
|
||||
def init_template_filters(app):
|
||||
@@ -75,6 +75,7 @@ def init_template_globals(app):
|
||||
app.jinja_env.globals.update(get_mode_as_word=get_mode_as_word)
|
||||
app.jinja_env.globals.update(integrations=integrations)
|
||||
app.jinja_env.globals.update(authed=authed)
|
||||
app.jinja_env.globals.update(is_admin=is_admin)
|
||||
|
||||
|
||||
def init_logs(app):
|
||||
|
||||
Reference in New Issue
Block a user