misc: remove compatibility code with old authentic version (#72025)

This commit is contained in:
Valentin Deniaud 2022-12-05 12:10:59 +01:00
parent e104e5859f
commit 42dbb3787b
2 changed files with 2 additions and 13 deletions

View File

@ -35,12 +35,7 @@ class AppConfig(django.apps.AppConfig):
def post_migrate(self, verbosity=2, interactive=True, using=DEFAULT_DB_ALIAS, **kwargs):
# create custom operations
from authentic2.a2_rbac.models import Operation
try:
from authentic2.a2_rbac.utils import get_operation
except ImportError:
# legacy
from django_rbac.utils import get_operation
from authentic2.a2_rbac.utils import get_operation
if not router.allow_migrate(using, Operation):
return

View File

@ -11,16 +11,10 @@ from authentic2.a2_rbac.models import (
)
from authentic2.a2_rbac.models import OrganizationalUnit as OU
from authentic2.a2_rbac.models import Permission, Role
from authentic2.a2_rbac.utils import get_operation
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.models import ContentType
try:
from authentic2.a2_rbac.utils import get_operation
except ImportError:
# legacy
from django_rbac.utils import get_operation
User = get_user_model()