diff --git a/junction/conferences/permissions.py b/junction/conferences/permissions.py index 6e4fdc34..ab00abce 100644 --- a/junction/conferences/permissions.py +++ b/junction/conferences/permissions.py @@ -6,7 +6,7 @@ def is_reviewer(user, conference): """Returns a boolean indicating if a given user is a conference reviewer. """ - if not user.is_authenticated(): + if not user.is_authenticated: return False qs = ConferenceProposalReviewer.objects.filter( diff --git a/junction/proposals/permissions.py b/junction/proposals/permissions.py index ee316880..8d678809 100644 --- a/junction/proposals/permissions.py +++ b/junction/proposals/permissions.py @@ -13,11 +13,11 @@ def is_proposal_voting_allowed(proposal): def is_proposal_author(user, proposal): - return user.is_authenticated() and proposal.author == user + return user.is_authenticated and proposal.author == user def is_proposal_reviewer(user, conference): - authenticated = user.is_authenticated() + authenticated = user.is_authenticated is_reviewer = ConferenceProposalReviewer.objects.filter( reviewer=user.id, conference=conference, active=True ).exists() @@ -26,7 +26,7 @@ def is_proposal_reviewer(user, conference): def is_proposal_section_reviewer(user, conference, proposal): return ( - user.is_authenticated() + user.is_authenticated and ProposalSectionReviewer.objects.filter( conference_reviewer__reviewer=user, conference_reviewer__conference=conference, diff --git a/junction/proposals/views.py b/junction/proposals/views.py index 1d7cc829..7dc868fb 100644 --- a/junction/proposals/views.py +++ b/junction/proposals/views.py @@ -234,7 +234,7 @@ def detail_proposal(request, conference_slug, slug, hashid=None): if public_voting_setting: public_voting_setting_value = public_voting_setting.value try: - if request.user.is_authenticated(): + if request.user.is_authenticated: proposal_vote = ProposalVote.objects.get( proposal=proposal, voter=request.user )