From 6524fa3bee12285e799b7ee437458f5e5c4f6f49 Mon Sep 17 00:00:00 2001 From: Benjamin Dauvergne Date: Fri, 25 Sep 2015 15:29:12 +0200 Subject: [PATCH 1/4] agent/authentic2: rename "Superuser" roles to "Superuser of " --- hobo/agent/authentic2/management/commands/hobo_deploy.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hobo/agent/authentic2/management/commands/hobo_deploy.py b/hobo/agent/authentic2/management/commands/hobo_deploy.py index 5e697e2..6f93797 100644 --- a/hobo/agent/authentic2/management/commands/hobo_deploy.py +++ b/hobo/agent/authentic2/management/commands/hobo_deploy.py @@ -146,9 +146,13 @@ class Command(hobo_deploy.Command): # add a superuser role for the service Role = get_role_model() + name = _('Superuser of %s') % service['title'] su_role, created = Role.objects.get_or_create( service=provider, slug='_a2-hobo-superuser', - defaults={'name': _('Superuser')}) + defaults={'name': name}) + if not created and su_role != name: + su_role.name = name + su_role.save() su_role.attributes.get_or_create(name='is_superuser', kind='string', value='true') -- 2.1.4