diff --git a/ticdesk/contextprocessors.py b/ticdesk/contextprocessors.py index 2ed42d8c05df4e82b7494cf11b2d5adecb5a50b0..74872ce7dc4d009a5cb76d2a24fed1088bb50c54 100644 --- a/ticdesk/contextprocessors.py +++ b/ticdesk/contextprocessors.py @@ -5,7 +5,7 @@ TeckidsPerson = apps.get_model('ticdesk_account', 'TeckidsPerson') def person_context(request): context = {} - if request.user.is_authenticated(): + if request.user.is_authenticated: person = TeckidsPerson.objects.get(uid=request.user.username) context['current_person'] = person diff --git a/ticdesk_events/views.py b/ticdesk_events/views.py index 81a52219b82e70c2c2329bc48c82859894c71423..ab4f74cf49c13bb479d6e965c588c33463c4eed4 100644 --- a/ticdesk_events/views.py +++ b/ticdesk_events/views.py @@ -33,7 +33,7 @@ def register_event(request, cn): context = {} # Only authenticated users an register for events - if not request.user.is_authenticated(): + if not request.user.is_authenticated: return redirect(reverse('ticdesk_account:login') + '?next=%s' % request.path) # Get current person and event diff --git a/ticdesk_org/util.py b/ticdesk_org/util.py index 93de2047fc8d692d2a8d90de7921167369302b0f..20e9a164eca8aeb4aa5363811db19927f63cfce0 100644 --- a/ticdesk_org/util.py +++ b/ticdesk_org/util.py @@ -13,7 +13,7 @@ logger = logging.getLogger(__name__) def may_see_group(group, user): # Not logged-in users cannot see anything - if not user.is_authenticated(): + if not user.is_authenticated: return False # Replace user variable it the user's TeckidsPerson @@ -45,7 +45,7 @@ def may_see_group(group, user): def may_see_person(person, user): # Not logged-in users cannot see anything - if not user.is_authenticated(): + if not user.is_authenticated: return False # Replace user variable with the user's TeckidsPerson @@ -80,7 +80,7 @@ def filter_disallowed_persons(persons, user): def get_relevant_groups(user): # Not logged-in users cannot see anything - if not user.is_authenticated(): + if not user.is_authenticated: return [] # Replace user variable with the user's TeckidsPerson