fixt #334. Let the anonymous user see the assignments by default

This commit is contained in:
Oskar Hahn 2012-08-05 11:58:11 +02:00
parent 998fb3e1ee
commit 008c743650

View File

@ -67,16 +67,16 @@ class GeneralConfig(FormView):
anonymous = Group.objects.get(name='Anonymous')
except Group.DoesNotExist:
default_perms = [u'can_see_agenda', u'can_see_projector',
u'can_see_application']
u'can_see_application', 'can_see_assignment']
anonymous = Group()
anonymous.name = 'Anonymous'
anonymous.save()
anonymous.permissions = Permission.objects.filter(
codename__in=default_perms)
anonymous.save()
messages.success(self.request,
_('Anonymous access enabled. Please modify the "Anonymous" ' \
'group to fit your required permissions.'))
messages.success(self.request,
_('Anonymous access enabled. Please modify the "Anonymous" ' \
'group to fit your required permissions.'))
else:
config['system_enable_anonymous'] = False