Skip to content

Commit c8957df

Browse files
committed
Set is_staff and is_superuser = True on Secretariat users
- Legacy-Id: 3879
1 parent 13aed82 commit c8957df

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

redesign/importing/import-roles.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,12 @@
221221
if email and o.user_level == IESGLogin.SECRETARIAT_LEVEL:
222222
if not Role.objects.filter(name=secretary_role, person=email.person):
223223
Role.objects.create(name=secretary_role, group=Group.objects.get(acronym="secretariat"), person=email.person, email=email)
224-
224+
u = email.person.user
225+
if u:
226+
u.is_staff = True
227+
u.is_superuser = True
228+
u.save()
229+
225230
# AreaDirector
226231
for o in AreaDirector.objects.all():
227232
if not o.area:

0 commit comments

Comments
 (0)