Projet

Général

Profil

0001-agent-authentic2-update-service-s-role-s-name-34580.patch

Benjamin Dauvergne, 06 juillet 2019 11:58

Télécharger (1,5 ko)

Voir les différences:

Subject: [PATCH] agent-authentic2: update service's role's name (#34580)

 hobo/agent/authentic2/management/commands/hobo_deploy.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hobo/agent/authentic2/management/commands/hobo_deploy.py
11 11

  
12 12
from django.contrib.auth import get_user_model
13 13
from django.contrib.contenttypes.models import ContentType
14
from django.utils.translation import ugettext_lazy as _, activate
14
from django.utils.translation import ugettext as _, activate
15 15
from django.core import serializers
16 16

  
17 17
from django_rbac.utils import get_role_model, get_ou_model
......
179 179
                su_role, created = Role.objects.get_or_create(
180 180
                    service=provider, slug='_a2-hobo-superuser',
181 181
                    defaults={'name': name})
182
                if su_role.name == 'Superuser':
182
                if su_role.name != name:
183 183
                    su_role.name = name
184 184
                    su_role.save()
185 185
                su_role.attributes.get_or_create(name='is_superuser',
186
-