mirror of https://github.com/JohnHammond/CTFd.git
Use authed function to check if user is authed in base.html (#1283)
* Use `authed` function to check if user is authed in `base.html`bulk-clear-sessions
parent
348fe5504e
commit
464f7bde58
|
@ -81,7 +81,7 @@
|
||||||
<hr class="d-sm-flex d-md-flex d-lg-none">
|
<hr class="d-sm-flex d-md-flex d-lg-none">
|
||||||
|
|
||||||
<ul class="navbar-nav ml-md-auto d-block d-sm-flex d-md-flex">
|
<ul class="navbar-nav ml-md-auto d-block d-sm-flex d-md-flex">
|
||||||
{% if name is defined %}
|
{% if authed() %}
|
||||||
{% if type == 'admin' %}
|
{% if type == 'admin' %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{{ url_for('admin.view') }}">
|
<a class="nav-link" href="{{ url_for('admin.view') }}">
|
||||||
|
|
|
@ -74,6 +74,7 @@ def init_template_globals(app):
|
||||||
app.jinja_env.globals.update(scores_visible=scores_visible)
|
app.jinja_env.globals.update(scores_visible=scores_visible)
|
||||||
app.jinja_env.globals.update(get_mode_as_word=get_mode_as_word)
|
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(integrations=integrations)
|
||||||
|
app.jinja_env.globals.update(authed=authed)
|
||||||
|
|
||||||
|
|
||||||
def init_logs(app):
|
def init_logs(app):
|
||||||
|
|
Loading…
Reference in New Issue