1.1
authorOlivier Larchevêque <olivier.larcheveque@auf.org>
Thu, 2 Feb 2012 19:21:00 +0000 (14:21 -0500)
committerOlivier Larchevêque <olivier.larcheveque@auf.org>
Thu, 2 Feb 2012 19:21:00 +0000 (14:21 -0500)
30 files changed:
.gitignore [changed mode: 0644->0755]
CHANGES [changed mode: 0644->0755]
MANIFEST.in [changed mode: 0644->0755]
README [changed mode: 0644->0755]
auf/__init__.py [changed mode: 0644->0755]
auf/django/__init__.py [changed mode: 0644->0755]
auf/django/skin/__init__.py [changed mode: 0644->0755]
auf/django/skin/context_processors.py [changed mode: 0644->0755]
auf/django/skin/static/skin/css/admin.css [changed mode: 0644->0755]
auf/django/skin/static/skin/css/auf.css [changed mode: 0644->0755]
auf/django/skin/static/skin/images/favicon.ico [changed mode: 0644->0755]
auf/django/skin/static/skin/images/logo_auf.gif [changed mode: 0644->0755]
auf/django/skin/static/skin/images/menu.png [changed mode: 0644->0755]
auf/django/skin/templates/404.html [changed mode: 0644->0755]
auf/django/skin/templates/500.html [changed mode: 0644->0755]
auf/django/skin/templates/actions.html [changed mode: 0644->0755]
auf/django/skin/templates/admin/base.html [changed mode: 0644->0755]
auf/django/skin/templates/admin/base_site.html [changed mode: 0644->0755]
auf/django/skin/templates/admin/form_utils/better_form.html [changed mode: 0644->0755]
auf/django/skin/templates/admin/form_utils/field.html [changed mode: 0644->0755]
auf/django/skin/templates/base.html [changed mode: 0644->0755]
auf/django/skin/templates/breadcrumb.html [changed mode: 0644->0755]
auf/django/skin/templates/footer.html [changed mode: 0644->0755]
auf/django/skin/templates/menu.html [changed mode: 0644->0755]
auf/django/skin/templates/registration/login.html [changed mode: 0644->0755]
auf/django/skin/templates/skin/demo.html [changed mode: 0644->0755]
auf/django/skin/templatetags/auf_menu.py [changed mode: 0644->0755]
auf/django/skin/views.py [changed mode: 0644->0755]
setup.cfg [changed mode: 0644->0755]
setup.py [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
diff --git a/CHANGES b/CHANGES
old mode 100644 (file)
new mode 100755 (executable)
index 496f02f..cdcd3a8
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,9 @@
-0.17dev (2012-01-12)
+1.1
+---
+
+* Cacher le changement de mdp pour les comptes employés
+
+1.0 (2012-01-12)
 --------------------
 - Django 1.3 ready
 
old mode 100644 (file)
new mode 100755 (executable)
diff --git a/README b/README
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 9be1632..c15e3a1
@@ -1,6 +1,7 @@
 # -*- encoding: utf-8 -*-
 
 import settings
+from auf.django.references import models as ref
 
 PROJET_TITRE_KEY = 'PROJET_TITRE'
 
@@ -12,6 +13,14 @@ def auf(request):
     if not site:
         site = "Créer une clef '%s' dans settings.py" % PROJET_TITRE_KEY
 
+    # le User peut changer de mdp s'il est local
+    try:
+        email = request.user.email
+        can_change_password = not ref.Authentification.objects.filter(courriel=email).exists() 
+    except:
+        can_change_password = None
+
     return {
         'AUF_SITE' : site,
+        'can_change_password' : can_change_password,
     }
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index c04af16..0e3c60a
@@ -1,4 +1,4 @@
-{% load theming_tags %}
+{% load i18n theming_tags auf_admin %}
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" lang="{{ LANGUAGE_CODE }}" xml:lang="{{ LANGUAGE_CODE }}" {% if LANGUAGE_BIDI %}dir="rtl"{% endif %}>
 <head>
@@ -12,7 +12,6 @@
 {% block extrahead %}{% endblock %}
 {% block blockbots %}<meta name="robots" content="NONE,NOARCHIVE" />{% endblock %}
 </head>
-{% load i18n %}
 
 <body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">
 
                 {% endif %}
 
                 <a href="/">Voir le site</a> / 
-
-                {% url admin:password_change as password_change_url %}
-                {% if password_change_url %}
-                    <a href="{{ password_change_url }}">
-                {% else %}
-                    <a href="{{ root_path }}password_change/">
+                {% if can_change_password %}
+                    {% url admin:password_change as password_change_url %}
+                    {% if password_change_url %}
+                        <a href="{{ password_change_url }}">
+                    {% else %}
+                        <a href="{{ root_path }}password_change/">
+                    {% endif %}
+                    {% trans 'Change password' %}</a> /
                 {% endif %}
-                {% trans 'Change password' %}</a> /
                 {% url admin:logout as logout_url %}
                 {% if logout_url %}
                     <a href="{{ logout_url }}">
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
old mode 100644 (file)
new mode 100755 (executable)
index 3323768..93f1823
--- a/setup.py
+++ b/setup.py
@@ -4,7 +4,7 @@ from setuptools import setup, find_packages
 import sys, os
 
 name = 'auf.django.skin'
-version = '1.0'
+version = '1.1'
 
 setup(name=name,
       version=version,