Skip to content

Commit 59cf9d9

Browse files
committed
Fix in line import
1 parent 48f0e00 commit 59cf9d9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ansible_base/rbac/claims.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from ansible_base.lib.utils.auth import get_team_model
1313

1414
from .models.content_type import DABContentType
15-
from .models.role import RoleDefinition
15+
from .models.role import RoleDefinition, RoleUserAssignment
1616

1717
logger = logging.getLogger(__name__)
1818

@@ -249,8 +249,6 @@ def get_role_definition(name: str) -> Optional[Model]:
249249
If this is the name of a managed role for which we have a corresponding definition in code,
250250
and that role can not be found in the database, it may be created here
251251
"""
252-
from ansible_base.rbac.models import RoleDefinition
253-
254252
try:
255253
return RoleDefinition.objects.get(name=name)
256254
except RoleDefinition.DoesNotExist:
@@ -315,8 +313,6 @@ def save_user_claims(user: Model, objects: dict, object_roles: dict, global_role
315313
"""
316314
Apply RBAC permissions from claims data
317315
"""
318-
from ansible_base.rbac.models import RoleUserAssignment
319-
320316
role_diff = RoleUserAssignment.objects.filter(user=user, role_definition__name__in=settings.ANSIBLE_BASE_JWT_MANAGED_ROLES)
321317

322318
for system_role_name in global_roles:

0 commit comments

Comments
 (0)