Fixed a place where a logged-in user without associcated Person would cause a 500 instead of 403.

- Legacy-Id: 11474
This commit is contained in:
Henrik Levkowetz 2016-06-25 20:27:13 +00:00
parent 834bf08d6f
commit 51b68099a5

View file

@ -18,6 +18,7 @@ def check_access(user):
This function takes a Django User object and returns true if the user has access to
the Announcement app.
'''
if hasattr(user, "person"):
person = user.person
groups_with_access = ("iab", "isoc", "isocbot", "rsoc", "ietf", "iaoc", "rse", "mentor","ietf-trust")
if Role.objects.filter(person=person,