parent
985ffb9e48
commit
8e0ca0e8eb
|
@ -3,13 +3,13 @@ import logging
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from authentic2 import app_settings
|
from authentic2 import app_settings
|
||||||
from authentic2.compat import get_user_model
|
|
||||||
from authentic2.compat_lasso import lasso
|
from authentic2.compat_lasso import lasso
|
||||||
from authentic2.models import Attribute
|
from authentic2.models import Attribute
|
||||||
from authentic2.saml.models import LibertyProvider, SPOptionsIdPPolicy, \
|
from authentic2.saml.models import LibertyProvider, SPOptionsIdPPolicy, \
|
||||||
SAMLAttribute, LibertyServiceProvider
|
SAMLAttribute, LibertyServiceProvider
|
||||||
from authentic2.a2_rbac.utils import get_default_ou
|
from authentic2.a2_rbac.utils import get_default_ou
|
||||||
|
|
||||||
|
from django.contrib.auth import get_user_model
|
||||||
from django.contrib.contenttypes.models import ContentType
|
from django.contrib.contenttypes.models import ContentType
|
||||||
from django.utils.translation import ugettext_lazy as _, activate
|
from django.utils.translation import ugettext_lazy as _, activate
|
||||||
from django.core import serializers
|
from django.core import serializers
|
||||||
|
@ -21,6 +21,8 @@ from tenant_schemas.utils import tenant_context
|
||||||
|
|
||||||
from hobo.agent.common.management.commands import hobo_deploy
|
from hobo.agent.common.management.commands import hobo_deploy
|
||||||
|
|
||||||
|
User = get_user_model()
|
||||||
|
|
||||||
|
|
||||||
class Command(hobo_deploy.Command):
|
class Command(hobo_deploy.Command):
|
||||||
help = 'Deploy multitenant authentic service from hobo'
|
help = 'Deploy multitenant authentic service from hobo'
|
||||||
|
@ -54,7 +56,7 @@ class Command(hobo_deploy.Command):
|
||||||
user_dict['is_staff'] = True
|
user_dict['is_staff'] = True
|
||||||
user_dict['is_superuser'] = True
|
user_dict['is_superuser'] = True
|
||||||
|
|
||||||
user, created = get_user_model().objects.get_or_create(
|
user, created = User.objects.get_or_create(
|
||||||
defaults=user_dict,
|
defaults=user_dict,
|
||||||
username=user_dict['username'])
|
username=user_dict['username'])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue