Skip to content

Commit

Permalink
modify CanPerformAssessmentMixin to be more explicit using is_assessor
Browse files Browse the repository at this point in the history
  • Loading branch information
dbca-asi committed Dec 14, 2016
1 parent 877bb9e commit f7a10fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wildlifelicensing/apps/applications/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.core.urlresolvers import reverse_lazy
from django.contrib.auth.mixins import UserPassesTestMixin

from wildlifelicensing.apps.main.helpers import is_customer, is_officer, get_user_assessor_groups
from wildlifelicensing.apps.main.helpers import is_customer, is_officer, is_assessor, get_user_assessor_groups
from wildlifelicensing.apps.applications.models import Application, Assessment


Expand Down Expand Up @@ -145,7 +145,7 @@ def test_func(self):
self.raise_exception = False
return False
self.raise_exception = True
if is_customer(user) or is_officer(user):
if not is_assessor(user):
return False
assessment = self.get_assessment()
return assessment is not None and assessment.assessor_group in get_user_assessor_groups(user)
Expand Down

0 comments on commit f7a10fe

Please sign in to comment.