Skip to content
Snippets Groups Projects
Verified Commit 56e739bd authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Correctly use is_authenticated as property.

parent fdb5a4e2
Branches
Tags
No related merge requests found
...@@ -5,7 +5,7 @@ TeckidsPerson = apps.get_model('ticdesk_account', 'TeckidsPerson') ...@@ -5,7 +5,7 @@ TeckidsPerson = apps.get_model('ticdesk_account', 'TeckidsPerson')
def person_context(request): def person_context(request):
context = {} context = {}
if request.user.is_authenticated(): if request.user.is_authenticated:
person = TeckidsPerson.objects.get(uid=request.user.username) person = TeckidsPerson.objects.get(uid=request.user.username)
context['current_person'] = person context['current_person'] = person
......
...@@ -33,7 +33,7 @@ def register_event(request, cn): ...@@ -33,7 +33,7 @@ def register_event(request, cn):
context = {} context = {}
# Only authenticated users an register for events # 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) return redirect(reverse('ticdesk_account:login') + '?next=%s' % request.path)
# Get current person and event # Get current person and event
......
...@@ -13,7 +13,7 @@ logger = logging.getLogger(__name__) ...@@ -13,7 +13,7 @@ logger = logging.getLogger(__name__)
def may_see_group(group, user): def may_see_group(group, user):
# Not logged-in users cannot see anything # Not logged-in users cannot see anything
if not user.is_authenticated(): if not user.is_authenticated:
return False return False
# Replace user variable it the user's TeckidsPerson # Replace user variable it the user's TeckidsPerson
...@@ -45,7 +45,7 @@ def may_see_group(group, user): ...@@ -45,7 +45,7 @@ def may_see_group(group, user):
def may_see_person(person, user): def may_see_person(person, user):
# Not logged-in users cannot see anything # Not logged-in users cannot see anything
if not user.is_authenticated(): if not user.is_authenticated:
return False return False
# Replace user variable with the user's TeckidsPerson # Replace user variable with the user's TeckidsPerson
...@@ -80,7 +80,7 @@ def filter_disallowed_persons(persons, user): ...@@ -80,7 +80,7 @@ def filter_disallowed_persons(persons, user):
def get_relevant_groups(user): def get_relevant_groups(user):
# Not logged-in users cannot see anything # Not logged-in users cannot see anything
if not user.is_authenticated(): if not user.is_authenticated:
return [] return []
# Replace user variable with the user's TeckidsPerson # Replace user variable with the user's TeckidsPerson
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment