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') anonymous = Group.objects.get(name='Anonymous')
except Group.DoesNotExist: except Group.DoesNotExist:
default_perms = [u'can_see_agenda', u'can_see_projector', default_perms = [u'can_see_agenda', u'can_see_projector',
u'can_see_application'] u'can_see_application', 'can_see_assignment']
anonymous = Group() anonymous = Group()
anonymous.name = 'Anonymous' anonymous.name = 'Anonymous'
anonymous.save() anonymous.save()
anonymous.permissions = Permission.objects.filter( anonymous.permissions = Permission.objects.filter(
codename__in=default_perms) codename__in=default_perms)
anonymous.save() anonymous.save()
messages.success(self.request, messages.success(self.request,
_('Anonymous access enabled. Please modify the "Anonymous" ' \ _('Anonymous access enabled. Please modify the "Anonymous" ' \
'group to fit your required permissions.')) 'group to fit your required permissions.'))
else: else:
config['system_enable_anonymous'] = False config['system_enable_anonymous'] = False