Skip to content

Commit

Permalink
Fixed import
Browse files Browse the repository at this point in the history
  • Loading branch information
danyi1212 committed Dec 18, 2024
1 parent 369bc2c commit 293d5a2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_rebac_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from permit.api.models import (
DerivedRoleBlockEdit,
DerivedRoleRuleCreate,
PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings,
PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings,
RelationCreate,
RelationshipTupleCreate,
RelationshipTupleDelete,
Expand Down Expand Up @@ -157,7 +157,7 @@ class PermissionAssertions:
role=MEMBER,
on_resource="Account",
linked_by_relation="account",
when=PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings(
when=PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings(
no_direct_roles_on_object=True,
),
)
Expand All @@ -176,7 +176,7 @@ class PermissionAssertions:
# tests creation of role derivation as part of the resource role
# (account admin is editor on everything)
granted_to=DerivedRoleBlockEdit(
when=PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings(
when=PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings(
no_direct_roles_on_object=True,
),
users_with_role=[
Expand Down Expand Up @@ -427,14 +427,14 @@ class PermissionAssertions:
pre_assertion_hook=lambda permit: permit.api.resource_roles.update_role_derivation_conditions(
resource_key=FOLDER.key,
role_key=EDITOR,
conditions=PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings(
conditions=PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings(
no_direct_roles_on_object=False
),
),
post_assertion_hook=lambda permit: permit.api.resource_roles.update_role_derivation_conditions(
resource_key=FOLDER.key,
role_key=EDITOR,
conditions=PermitBackendSchemasSchemaDerivedRoleDerivedRoleSettings(
conditions=PermitBackendSchemasSchemaDerivedRoleRuleDerivationSettings(
no_direct_roles_on_object=True
),
),
Expand Down

0 comments on commit 293d5a2

Please sign in to comment.