Set is_staff and is_superuser = True on Secretariat users

- Legacy-Id: 3879
This commit is contained in:
Ole Laursen 2012-01-31 11:51:08 +00:00
parent 13aed82a0e
commit c8957df904

View file

@ -221,7 +221,12 @@ for o in IESGLogin.objects.all():
if email and o.user_level == IESGLogin.SECRETARIAT_LEVEL:
if not Role.objects.filter(name=secretary_role, person=email.person):
Role.objects.create(name=secretary_role, group=Group.objects.get(acronym="secretariat"), person=email.person, email=email)
u = email.person.user
if u:
u.is_staff = True
u.is_superuser = True
u.save()
# AreaDirector
for o in AreaDirector.objects.all():
if not o.area: