fixt #334. Let the anonymous user see the assignments by default
This commit is contained in:
parent
998fb3e1ee
commit
008c743650
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user