mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2026-01-27 09:01:24 +01:00
Add user security questions upon registration as extra authentication for password reset. Three unique security questions must be chosen and answered. Answers are then stored in the database with the same hashing algorithm as the users's password. On password reset, users get two chances to get two out of three security questions answered correctly. After a second failure their account is locked and email is sent to the admin. The same template is shown for the axes lockout. Super user cannot reset their password until they set security questions. Users can update their security questions or add them if they weren't originally set (in the case of super user) in Edit Profile. Signed-off-by: Amber Elliot <amber.n.elliot@intel.com>
59 lines
1.4 KiB
HTML
59 lines
1.4 KiB
HTML
{% extends "base.html" %}
|
|
{% load i18n %}
|
|
|
|
{% comment %}
|
|
|
|
layerindex-web - profile page template
|
|
|
|
Copyright (C) 2013 Intel Corporation
|
|
Licensed under the MIT license, see COPYING.MIT for details
|
|
|
|
{% endcomment %}
|
|
|
|
|
|
<!--
|
|
{% autoescape on %}
|
|
{% block title_append %} - profile{% endblock %}
|
|
{% endautoescape %}
|
|
-->
|
|
|
|
{% block content %}
|
|
{% autoescape on %}
|
|
|
|
<form method="post" action=".">
|
|
{% for hidden in form.hidden_fields %}
|
|
{{ hidden }}
|
|
{% endfor %}
|
|
|
|
{% if form.non_field_errors %}
|
|
<div class="form-group alert alert-danger">
|
|
{{ form.non_field_errors }}
|
|
</div>
|
|
{% endif %}
|
|
|
|
{% for field in form.visible_fields %}
|
|
{% if field.name in error_fields %}
|
|
<div class="form-group alert alert-danger">
|
|
{{ field.errors }}
|
|
{% else %}
|
|
<div class="form-group">
|
|
{% endif %}
|
|
<div class="control-label {% if field.required %}requiredlabel{% endif %}">
|
|
{{ field.label_tag }}
|
|
</div>
|
|
<div class="controls">
|
|
{{ field }}
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
<input type="submit" class="btn btn-default" value="{% trans 'Save' %}" />
|
|
<a class="btn btn-default" href="{{ return_url }}">{% trans 'Cancel' %}</a>
|
|
<a class="btn btn-danger" href="{% url 'delete_account' %}">{% trans 'Delete account' %}</a>
|
|
{% csrf_token %}
|
|
</form>
|
|
|
|
{% endautoescape %}
|
|
|
|
{% endblock %}
|