ihatemoney/budget/templates/authenticate.html
0livd ea8eda35a7 Public project creation and admin permissions (#210)
* Add a @requires_admin decorator

It can be used to protect specific endpoints with ADMIN_PASSWORD
(a password that is stored unencrypted in the settings)
The decorator has no effect if ADMIN_PASSWORD is an empty string (default value)

* Require admin permissions to access create project endpoint

When ADMIN_PASSWORD is not empty, project creation form on the
home page will be replaced by a link to the create project endpoint
so one is able to enter the admin password before filling the form
2017-05-18 11:48:09 +02:00

19 lines
587 B
HTML

{% extends "layout.html" %}
{% block content %}
<h2>Authentication</h2>
{% if create_project %}
<p class="info">{{ _("The project you are trying to access do not exist, do you want
to") }} <a href="{{ url_for(".create_project", project_id=create_project) }}">{{ _("create it") }}</a>{{ _("?") }}
</p>
{% endif %}
{% if admin_auth %}
<form class="form-horizontal" method="POST" accept-charset="utf-8">
{{ forms.admin(form) }}
</form>
{% else %}
<form class="form-horizontal" method="POST" accept-charset="utf-8">
{{ forms.authenticate(form) }}
</form>
{% endif %}
{% endblock %}