misc: retrieve rbac-related objects from a2_rbac app (#70563)
This commit is contained in:
parent
86d4025304
commit
0d46b00c2f
|
@ -34,7 +34,7 @@ class AppConfig(django.apps.AppConfig):
|
|||
|
||||
def post_migrate(self, verbosity=2, interactive=True, using=DEFAULT_DB_ALIAS, **kwargs):
|
||||
# create custom operations
|
||||
from django_rbac.models import Operation
|
||||
from authentic2.a2_rbac.models import Operation
|
||||
from django_rbac.utils import get_operation
|
||||
|
||||
if not router.allow_migrate(using, Operation):
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
from authentic2.a2_rbac.models import ACTIVATE_OP, RESET_PASSWORD_OP
|
||||
from authentic2.a2_rbac.models import (
|
||||
ACTIVATE_OP,
|
||||
ADD_OP,
|
||||
ADMIN_OP,
|
||||
CHANGE_OP,
|
||||
DELETE_OP,
|
||||
RESET_PASSWORD_OP,
|
||||
SEARCH_OP,
|
||||
VIEW_OP,
|
||||
Operation,
|
||||
)
|
||||
from django.contrib.auth import get_user_model
|
||||
from django.contrib.contenttypes.models import ContentType
|
||||
from django_rbac.models import ADD_OP, ADMIN_OP, CHANGE_OP, DELETE_OP, SEARCH_OP, VIEW_OP, Operation
|
||||
from django_rbac.utils import get_operation, get_ou_model, get_permission_model, get_role_model
|
||||
|
||||
OU = get_ou_model()
|
||||
|
|
Loading…
Reference in New Issue