Commit 2a053b57 authored by Robin Sonnabend's avatar Robin Sonnabend

Fixed is_authenticated

parent fe44ca89
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<h3 class="mdl-card__title-text">{{ event.name }}: {{ speaker.name }}</h3> <h3 class="mdl-card__title-text">{{ event.name }}: {{ speaker.name }}</h3>
</div> </div>
<div class="mdl-card__actions"> <div class="mdl-card__actions">
{% if current_user.is_authenticated and "user" in current_user.roles %} {% if current_user.is_authenticated() and "user" in current_user.roles %}
<a href="{{ url_for("speech.index", event=event.id) }}"> <a href="{{ url_for("speech.index", event=event.id) }}">
<button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored"> <button type="button" class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored">
<i class="material-icons" role="presentation">build</i> <i class="material-icons" role="presentation">build</i>
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<header class="rede-drawer-header"> <header class="rede-drawer-header">
<div class="rede-account-dropdown"> <div class="rede-account-dropdown">
<span> <span>
{% if current_user.is_authenticated %} {% if current_user.is_authenticated() %}
<p class="md-24"> <p class="md-24">
<i class="material-icons md-48"> <i class="material-icons md-48">
{% if "user" in current_user.roles and not "admin" in current_user.roles %} {% if "user" in current_user.roles and not "admin" in current_user.roles %}
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
</button> </button>
</span> </span>
<ul class="mdl-menu mdl-menu--bottom-left mdl-js-menu mdl-js-ripple-effet" for="accbtn"> <ul class="mdl-menu mdl-menu--bottom-left mdl-js-menu mdl-js-ripple-effet" for="accbtn">
{% if current_user.is_authenticated %} {% if current_user.is_authenticated() %}
<li class="mdl-menu__item"><a class="mdl-navigation__link" href="{{ url_for("logout") }}">Logout</a></li> <li class="mdl-menu__item"><a class="mdl-navigation__link" href="{{ url_for("logout") }}">Logout</a></li>
{% else %} {% else %}
<li class="mdl-menu__item"><a class="mdl-navigation__link" href="{{ url_for("login") }}">Login</a></li> <li class="mdl-menu__item"><a class="mdl-navigation__link" href="{{ url_for("login") }}">Login</a></li>
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
<a class="mdl-navigation__link" href="{{ url_for("speech.index") }}"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">build</i>Handle speakers</a> <a class="mdl-navigation__link" href="{{ url_for("speech.index") }}"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">build</i>Handle speakers</a>
{% endif %} {% endif %}
<a class="mdl-navigation__link" href="{{ url_for("speech.show") }}"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">announcement</i>Pending speakers</a> <a class="mdl-navigation__link" href="{{ url_for("speech.show") }}"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">announcement</i>Pending speakers</a>
{% if current_user.is_authenticated and "admin" in current_user.roles %} {% if current_user.is_authenticated() and "admin" in current_user.roles %}
<a class="mdl-navigation__link" href="{{ url_for("admin.index") }}"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">computer</i>Administration</a> <a class="mdl-navigation__link" href="{{ url_for("admin.index") }}"><i class="mdl-color-text--blue-grey-400 material-icons" role="presentation">computer</i>Administration</a>
{% block additional_sidelinks %} {% block additional_sidelinks %}
<!-- put your additional sidelinks here --> <!-- put your additional sidelinks here -->
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
{% if current_user.is_authenticated and "user" in current_user.roles %} {% if current_user.is_authenticated() and "user" in current_user.roles %}
{{ render_form(add_form, action_url=url_for('.add', next=".index", event=event_id), action_text="Add", title="Add Speaker to {}".format(event.name)) }} {{ render_form(add_form, action_url=url_for('.add', next=".index", event=event_id), action_text="Add", title="Add Speaker to {}".format(event.name)) }}
{% endif %} {% endif %}
{% endfor %} {% endfor %}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment