From 76824dcc7a1af590bea5418304e33e7e2879ad73 Mon Sep 17 00:00:00 2001 From: Marcio Mazza Date: Wed, 30 May 2018 11:32:50 -0300 Subject: [PATCH] =?UTF-8?q?Retira=20restri=C3=A7=C3=A3o=20de=20num=20de=20?= =?UTF-8?q?superusers=20ao=20migrar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sapl/legacy/migracao_usuarios.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/sapl/legacy/migracao_usuarios.py b/sapl/legacy/migracao_usuarios.py index be0478c82..51b3348c8 100644 --- a/sapl/legacy/migracao_usuarios.py +++ b/sapl/legacy/migracao_usuarios.py @@ -95,16 +95,7 @@ def migrar_usuarios(dir_repo): usuario.groups.add(PERFIL_LEGADO_PARA_NOVO[perfil]) usuario.save() - # restringe e configura administradores - if len(admins) > 2: - admins = ( - # ususários com admin no nome - [u for u in admins if 'admin' in u.username] - # senão, o usuário saploper, apenas - or [u for u in admins if 'saploper' == u.username] - # senão, simplesmente até os dois primeiros da lista - or admins[:2] - ) + # configura administradores for admin in admins: admin.is_superuser = True admin.save()