0001-agent-adapts-to-authentic2-spring-cleaning-33120.patch
hobo/agent/authentic2/management/commands/hobo_deploy.py | ||
---|---|---|
3 | 3 |
import os |
4 | 4 | |
5 | 5 |
from authentic2 import app_settings |
6 |
from authentic2.compat import get_user_model |
|
7 | 6 |
from authentic2.compat_lasso import lasso |
8 | 7 |
from authentic2.models import Attribute |
9 | 8 |
from authentic2.saml.models import LibertyProvider, SPOptionsIdPPolicy, \ |
10 | 9 |
SAMLAttribute, LibertyServiceProvider |
11 | 10 |
from authentic2.a2_rbac.utils import get_default_ou |
12 | 11 | |
12 |
from django.contrib.auth import get_user_model |
|
13 | 13 |
from django.contrib.contenttypes.models import ContentType |
14 | 14 |
from django.utils.translation import ugettext_lazy as _, activate |
15 | 15 |
from django.core import serializers |
... | ... | |
21 | 21 | |
22 | 22 |
from hobo.agent.common.management.commands import hobo_deploy |
23 | 23 | |
24 |
User = get_user_model() |
|
25 | ||
24 | 26 | |
25 | 27 |
class Command(hobo_deploy.Command): |
26 | 28 |
help = 'Deploy multitenant authentic service from hobo' |
... | ... | |
54 | 56 |
user_dict['is_staff'] = True |
55 | 57 |
user_dict['is_superuser'] = True |
56 | 58 | |
57 |
user, created = get_user_model().objects.get_or_create(
|
|
59 |
user, created = User.objects.get_or_create(
|
|
58 | 60 |
defaults=user_dict, |
59 | 61 |
username=user_dict['username']) |
60 | 62 | |
61 |
- |