Skip to content

Commit

Permalink
Use authed function to check if user is authed in base.html (CTFd#1283)
Browse files Browse the repository at this point in the history
* Use `authed` function to check if user is authed in `base.html`
  • Loading branch information
ColdHeat authored Mar 8, 2020
1 parent 348fe55 commit 464f7bd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CTFd/themes/core/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<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">
{% if name is defined %}
{% if authed() %}
{% if type == 'admin' %}
<li class="nav-item">
<a class="nav-link" href="{{ url_for('admin.view') }}">
Expand Down
1 change: 1 addition & 0 deletions CTFd/utils/initialization/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def init_template_globals(app):
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(integrations=integrations)
app.jinja_env.globals.update(authed=authed)


def init_logs(app):
Expand Down

0 comments on commit 464f7bd

Please sign in to comment.