Skip to content
Snippets Groups Projects
Commit 60fc0d56 authored by Christian Dresen's avatar Christian Dresen
Browse files

Added Reset Password

- Missing: real password reset
parent 70a20679
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 2866 deletions
File deleted
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('../../js/transition.js')
require('../../js/alert.js')
require('../../js/button.js')
require('../../js/carousel.js')
require('../../js/collapse.js')
require('../../js/dropdown.js')
require('../../js/modal.js')
require('../../js/tooltip.js')
require('../../js/popover.js')
require('../../js/scrollspy.js')
require('../../js/tab.js')
require('../../js/affix.js')
\ No newline at end of file
{% extends "base.html" %}
{% load i18n %}
{% block content %}
<h1>{% trans 'My Account' %}</h1><br />
<ul class="nav nav-tabs">
<li class="{% block account_nav_email %}{% endblock %}">
<a href="{% url 'account_email' %}">{% trans 'E-mail Addresses' %}</a>
</li>
<li class="{% block account_nav_change_password %}{% endblock %}">
<a href="{% url 'account_change_password' %}">{% trans 'Change Password' %}</a>
</li>
{% url 'socialaccount_connections' as connections_url %}
{% if connections_url %}
<li class="{% block account_nav_socialaccount_connections %}{% endblock %}">
<a href="{{ connections_url }}">{% trans 'Connected Accounts' %}</a>
</li>
{% endif %}
</ul>
<br />
{% block account_content %}
{% endblock %}
{% endblock %}
{% extends "account/base.html" %}
{% load i18n %}
{% load bootstrap %}
{% block head_title %}{% trans "Account" %}{% endblock %}
{% block account_nav_email %}active{% endblock %}
{% block account_content %}
{% if user.emailaddress_set.all %}
<p>{% trans 'The following e-mail addresses are associated to your account:' %}</p>
<form action="{% url 'account_email' %}" class="email_list uniForm" method="post">
{% csrf_token %}
<table class="table">
<thead>
<tr>
<th>
{% trans 'E-mail' %}
</th>
<th>
{% trans 'Status' %}
</th>
</tr>
</thead>
<tbody>
{% for emailaddress in user.emailaddress_set.all %}
<tr>
<td>
<label class="radio" for="email_radio_{{ forloop.counter }}" class="{% if emailaddress.primary %}primary_email{% endif %}">
<input id="email_radio_{{ forloop.counter }}" type="radio" name="email" {% if emailaddress.primary %}checked="checked"{% endif %} value="{{ emailaddress.email }}"/>
{{ emailaddress.email }}
</label>
</td>
<td>
{% if emailaddress.verified %}
<span class="label label-info">{% trans "Verified" %}</span>
{% else %}
<span class="label label-warning">{% trans "Unverified" %}</span>
{% endif %}
{% if emailaddress.primary %}<span class="label label-success">{% trans "Primary" %}</span>{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
<div class="form-actions">
<button class="btn btn-success" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button>
<button class="btn" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button>
<button class="btn btn-danger" type="submit" name="action_remove" >{% trans 'Remove' %}</button>
</div>
</fieldset>
</form>
{% else %}
<p><strong>{% trans 'Warning:'%}</strong> {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}</p>
{% endif %}
<h2>{% trans "Add E-mail Address" %}</h2>
<form method="post" action="">
{% csrf_token %}
{{ add_email_form|bootstrap }}
<div class="form-actions">
<button class="btn btn-primary" name="action_add" type="submit">{% trans "Add E-mail" %}</button>
</div>
</form>
{% endblock %}
{% block extra_body %}
<script type="text/javascript">
$(function(){
$("button[name='action_remove']").click(function(){
if (confirm("{% trans 'Do you really want to remove the selected e-mail address?' %}")) {
return true;
}
return false;
});
});
</script>
{% endblock %}
{% extends "account/base.html" %}
{% load i18n %}
{% load account %}
{% block head_title %}{% trans "Confirm E-mail Address" %}{% endblock %}
{% block content %}
<h1>{% trans "Confirm E-mail Address" %}</h1>
{% if confirmation %}
{% user_display confirmation.email_address.user as user_display %}
<p>{% blocktrans with confirmation.email_address.email as email %}Please confirm that <a href="mailto:{{ email }}">{{ email }}</a> is an e-mail address for user {{ user_display }}.{% endblocktrans %}</p>
<form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
{% csrf_token %}
<button class="btn btn-primary" type="submit">{% trans 'Confirm' %}</button>
</form>
{% else %}
{% url 'account_email' as email_url %}
<p>{% blocktrans %}This e-mail confirmation link expired or is invalid. Please <a href="{{ email_url }}">issue a new e-mail confirmation request</a>.{% endblocktrans %}</p>
{% endif %}
{% endblock %}
{% extends "account/base.html" %}
{% load i18n %}
{% load bootstrap %}
{% block head_title %}{% trans "Sign In" %}{% endblock %}
{% block content %}
<h1>{% trans "Sign In" %}</h1>
<form class="login" method="POST" action="{% url 'account_login' %}">
{% csrf_token %}
{{ form|bootstrap }}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}
<div class="form-actions">
<button class="btn btn-primary" type="submit">{% trans "Sign In" %}</button>
<a class="btn" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
</div>
</form>
{% endblock %}
{% extends "account/base.html" %}
{% load i18n %}
{% block head_title %}{% trans "Sign Out" %}{% endblock %}
{% block content %}
<h1>{% trans "Sign Out" %}</h1>
<p>{% trans 'Are you sure you want to sign out?' %}</p>
<form method="post" action="{% url 'account_logout' %}">
{% csrf_token %}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
{% endif %}
<button class="btn btn-primary" type="submit">{% trans 'Sign Out' %}</button>
</form>
{% endblock %}
{% extends "account/base.html" %}
{% load i18n %}
{% load bootstrap %}
{% block head_title %}{% trans "Change Password" %}{% endblock %}
{% block account_nav_change_password %}active{% endblock %}
{% block account_content %}
<form method="POST" action="" class="password_change">
{% csrf_token %}
{{ password_change_form|bootstrap }}
<div class="form-actions">
<button class="btn btn-primary" type="submit" name="action">{% trans "Change Password" %}</button>
</div>
</form>
{% endblock %}
{% extends "account/base.html" %}
{% load i18n %}
{% load bootstrap %}
{% load account %}
{% block head_title %}{% trans "Password Reset" %}{% endblock %}
{% block content %}
<h1>{% trans "Password Reset" %}</h1>
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p>
<form method="POST" action="" >
{% csrf_token %}
{{ password_reset_form|bootstrap }}
<div class="form-actions">
<input class="btn btn-primary" type="submit" value="{% trans "Reset My Password" %}" />
</div>
</form>
<p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p>
{% endblock %}
{% block extra_body %}
<script>
$("#id_email").focus();
</script>
{% endblock %}
{% extends "account/base.html" %}
{% load i18n %}
{% load bootstrap %}
{% block head_title %}{% trans "Change Password" %}{% endblock %}
{% block content %}
<h1>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h1>
{% if token_fail %}
{% url 'account_reset_password' as passwd_reset_url %}
<p>{% blocktrans %}The password reset link was invalid, possibly because it has already been used. Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.{% endblocktrans %}</p>
{% else %}
{% if form %}
<form method="POST" action="" class="uniForm">
{% csrf_token %}
{{ form|bootstrap }}
<div class="form-actions">
<button class="btn btn-primary" type="submit">{% trans "Change Password" %}</button>
</div>
</form>
{% else %}
<p>{% trans 'Your password is now changed.' %}</p>
{% endif %}
{% endif %}
{% endblock %}
{% extends "account/base.html" %}
{% load i18n %}
{% load bootstrap %}
{% block head_title %}{% trans "Set Password" %}{% endblock %}
{% block account_nav_change_password %}active{% endblock %}
{% block account_content %}
<form method="POST" action="" class="password_set">
{% csrf_token %}
{{ password_set_form|bootstrap }}
<div class="form-actions">
<input class="btn btn-primary" type="submit" name="action" value="{% trans "Set Password" %}"/>
</div>
</form>
{% endblock %}
{% extends "account/base.html" %}
{% load bootstrap %}
{% load i18n %}
{% block head_title %}{% trans "Signup" %}{% endblock %}
{% block content %}
<h1>{% trans "Sign Up" %}</h1>
<p>{% blocktrans %}Already have an account? Then please <a href="{{ login_url }}">sign in</a>.{% endblocktrans %}</p>
<form id="signup_form" method="post" action="{% url 'account_signup' %}">
{% csrf_token %}
{{ form|bootstrap }}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}
<div class="form-actions">
<button class="btn btn-primary" type="submit">{% trans "Sign Up" %}</button>
</div>
</form>
{% endblock %}
File deleted
"""
Django settings for warpauth project.
Generated by 'django-admin startproject' using Django 1.8.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'x(e-&mxb*99l2d0*oe91b@&4h6rpcx0j4%#@eq!r0(6%3gnq32'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = []
SITE_ID = 1
# Application definition
INSTALLED_APPS = (
'django_admin_bootstrapped',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.sites',
'bootstrapform',
'allauth_bootstrap',
'allauth',
'allauth.account',
)
MIDDLEWARE_CLASSES = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.middleware.locale.LocaleMiddleware',
)
ROOT_URLCONF = 'warpauth.urls'
LOGIN_REDIRECT_URL = '/'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, 'templates'),os.path.join(BASE_DIR, 'auth/templates')],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
# "allauth.account.context_processors.account",
# "allauth.socialaccount.context_processors.socialaccount",
'django.contrib.messages.context_processors.messages',
'auth.context_processors.navbar_processor'
],
},
},
]
WSGI_APPLICATION = 'warpauth.wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
AUTHENTICATION_BACKENDS = (
'django_auth_ldap.backend.LDAPBackend',
'django.contrib.auth.backends.ModelBackend',
)
# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/
#LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = 'de'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/
STATIC_URL = '/static/'
MEDIA_ROOT = 'media/'
MEDIA_URL = '/media/'
AUTH_LDAP_SERVER_URI = "ldap://s1.dyhost.de"
AUTH_LDAP_BIND_DN = "admin"
AUTH_LDAP_BIND_PASSWORD = "12345"
AUTH_LDAP_USER_DN_TEMPLATE = "uid=%(user)s,ou=User,dc=warpzone,dc=ms"
AUTH_LDAP_USER_ATTR_MAP = {
"first_name": "givenName",
"last_name": "sn",
"email": "mail"
}
\ No newline at end of file
File deleted
"""warpauth URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based views
1. Add an import: from other_app.views import Home
2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home')
Including another URLconf
1. Add an import: from blog import urls as blog_urls
2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
from auth import views
from django.conf import settings
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^$', views.index, name='index'),
url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT,}),
url(r'^accounts/', include('allauth.urls')),
]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment