misc: do not crash on users that have None as roles (#6755)

This commit is contained in:
Frédéric Péters 2015-03-17 09:36:53 +01:00
parent 854feb4a45
commit 32078370f1
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ class FormPage(Directory):
raise errors.AccessUnauthorizedError()
if logged_users_role().id not in self.formdef.roles and not (
self.user and self.user.is_admin):
if self.user:
if self.user and self.user.roles:
user_roles = set(self.user.roles)
else:
user_roles = set([])