Switch to Authens for GestioCOF authentication

This commit is contained in:
Martin Pépin 2020-09-17 21:35:15 +02:00
parent 26455ae5c6
commit a98e56d316
No known key found for this signature in database
GPG key ID: E7520278B1774448
8 changed files with 18 additions and 124 deletions

View file

@ -73,7 +73,7 @@ class GenericLoginView(View):
here_qd["next"] = self.request.GET["next"]
here_url += "?{}".format(here_qd.urlencode())
logout_url = reverse("cof-logout")
logout_url = reverse("authens:logout")
logout_qd = QueryDict(mutable=True)
logout_qd["next"] = here_url
logout_url += "?{}".format(logout_qd.urlencode(safe="/"))

View file

@ -101,7 +101,7 @@
{% endif %}
<li class="divider"></li>
<li>
<a href="{% url "cof-logout" %}?next={{ kfet_home_url|urlencode }}">
<a href="{% url "authens:logout" %}?next={{ kfet_home_url|urlencode }}">
<span class="glyphicon glyphicon-log-out"></span><span>Déconnexion</span>
</a>
</li>
@ -110,13 +110,13 @@
{% endif %}
{% if user.is_authenticated and not perms.kfet.is_team %}
<li>
<a href="{% url "cof-logout" %}?next={{ kfet_home_url|urlencode }}" title="Déconnexion">
<a href="{% url "authens:logout" %}?next={{ kfet_home_url|urlencode }}" title="Déconnexion">
<span class="glyphicon glyphicon-log-out"></span>
</a>
</li>
{% elif not user.is_authenticated %}
<li>
<a href="{% url "cof-login" %}?next={{ request.path|urlencode }}" title="Connexion">
<a href="{% url "authens:login" %}?next={{ request.path|urlencode }}" title="Connexion">
<span>Connexion</span><!--
--><span class="glyphicon glyphicon-log-in"></span>
</a>