From 7be596f41305b4be26796625bd800d58a04bb0a7 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 23 Aug 2013 18:25:58 +0200 Subject: PersonType from single value to multi value for Person --- archaeological_operations/views.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'archaeological_operations/views.py') diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index c2e0b135c..97446b635 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -31,13 +31,11 @@ from forms import * import models def autocomplete_patriarche(request, non_closed=True): - person_types = request.user.ishtaruser.person.person_type if (not request.user.has_perm('ishtar_common.view_operation', models.Operation) and not request.user.has_perm('ishtar_common.view_own_operation', models.Operation) - and not person_types.rights.filter( - wizard__url_name='operation_search').count()): + and not request.user.ishtaruser.has_right('operation_search')): return HttpResponse(mimetype='text/plain') if not request.GET.get('term'): return HttpResponse(mimetype='text/plain') @@ -60,8 +58,7 @@ def autocomplete_operation(request, non_closed=True): models.Operation) and not request.user.has_perm('ishtar_common.view_own_operation', models.Operation) - and not person_types.rights.filter( - wizard__url_name='operation_search').count()): + and not request.user.ishtaruser.has_right('operation_search')): return HttpResponse(mimetype='text/plain') if not request.GET.get('term'): return HttpResponse(mimetype='text/plain') -- cgit v1.2.3