upgrade saml
authorOlivier Larchevêque <olivier.larcheveque@auf.org>
Wed, 19 Sep 2012 18:47:03 +0000 (14:47 -0400)
committerOlivier Larchevêque <olivier.larcheveque@auf.org>
Wed, 19 Sep 2012 18:47:03 +0000 (14:47 -0400)
buildout.cfg
project/conf.py.edit
project/dae/models.py
project/rh/admin.py
project/settings.py
versions.cfg

index c36a14c..46282f5 100644 (file)
@@ -15,6 +15,7 @@ find-links = http://pypi.auf.org/simple/auf.recipe.django/
     http://pypi.auf.org/simple/auf.django.permissions/
     http://pypi.auf.org/simple/auf.django.emploi/
     http://pypi.auf.org/simple/auf.django.references/
+    http://pypi.auf.org/simple/auf.django.piwik/
     http://pypi.auf.org/simple/django-alphafilter/
     http://pypi.auf.org/simple/odsgen/
 
@@ -45,6 +46,7 @@ eggs =
     auf.django.references
     auf.django.skin
     auf.django.workflow
+    auf.django.piwik
     auf.recipe.django
     odsgen
     django-picklefield
index 0f33865..114cec0 100644 (file)
@@ -15,3 +15,5 @@ EMAIL_FROM = ''
 ROA_API_KEY = ''
 
 AUTH_PASSWORD_REQUIRED = True
+
+PIWIK_TOKEN = ''
index 4f3c195..158af84 100644 (file)
@@ -657,7 +657,6 @@ class Dossier(DossierWorkflow, rh.Dossier_):
         dossier_rh.regime_travail_nb_heure_semaine = \
                 self.regime_travail_nb_heure_semaine
         dossier_rh.date_debut = self.contrat_date_debut
-        dossier_rh.date_fin = self.contrat_date_fin
         dossier_rh.save()
 
         rh.DossierComparaison.objects.filter(dossier=dossier_rh).delete()
index 6a90877..71679a8 100644 (file)
@@ -20,7 +20,8 @@ from project.rh import models as rh
 from project.permissions import user_gere_obj_de_sa_region, \
         user_can_add_obj, \
         user_can_change_obj, \
-        user_can_delete_obj
+        user_can_delete_obj, \
+        get_region_user
 
 from project.rh.forms import ContratForm, AyantDroitForm, EmployeAdminForm, \
         AjaxSelect, DossierForm, ResponsableInlineForm
@@ -133,25 +134,22 @@ class ProtectRegionMixin(object):
         if in_drh_or_admin(request.user):
             return qs
 
-        #if user_gere_obj_de_sa_region(request.user):
-        #    region_user = get_region_user(request.user)
-        #    q = Q(**{self.model.prefix_implantation: \
-        #            region_user})
-        #    qs = qs.filter(q).distinct()
-        #    return qs
+        if user_gere_obj_de_sa_region(request.user):
+            region_user = get_region_user(request.user)
+            q = Q(**{self.model.prefix_implantation: \
+                    region_user})
+            qs = qs.filter(q).distinct()
+            return qs
         return qs.none()
 
     def has_add_permission(self, request):
-        return in_drh_or_admin(request.user)
-        #return user_can_add_obj(request.user)
+        return user_can_add_obj(request.user)
 
     def has_change_permission(self, request, obj=None):
-        return in_drh_or_admin(request.user)
-        #return user_can_change_obj(request.user, obj) if obj else True
+        return user_can_change_obj(request.user, obj) if obj else True
 
     def has_delete_permission(self, request, obj=None):
-        return in_drh_or_admin(request.user)
-        #return user_can_delete_obj(request.user, obj) if obj else True
+        return user_can_delete_obj(request.user, obj) if obj else True
 
 
 class DerniereModificationAdmin(admin.ModelAdmin):
index 61e44f9..201a302 100644 (file)
@@ -59,6 +59,7 @@ MIDDLEWARE_CLASSES = (
     'django.contrib.messages.middleware.MessageMiddleware',
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'auf.django.saml.middleware.SPMiddleware',
+    'auf.django.piwik.middleware.TrackMiddleware',
     'django.middleware.doc.XViewMiddleware',
     'reversion.middleware.RevisionMiddleware',
 )
index c66194e..6a1fa93 100644 (file)
@@ -4,7 +4,7 @@ south = 0.7
 django-admin-tools = 0.4.1
 django-ajax-selects = 1.1.4
 django-alphafilter = 0.5.3auf4
-django-reversion = 1.5.2
+django-reversion = 1.5.4
 django-sendfile = 0.2.1
 django-urldecorators = 0.3
 auf.django.auth = 0.5.5dev
@@ -72,5 +72,8 @@ auf.recipe.django = 2.1
 # Added by Buildout Versions at 2012-08-23 09:21:24.235070
 raven = 2.0.4
 
+# Added by Buildout Versions at 2012-09-18 10:17:13.131666
+auf.django.piwik = 1.7
+
 # Added by Buildout Versions at 2012-09-19 14:46:17.866203
 auf.django.saml = 1.8