Skip to content

Commit

Permalink
Merge pull request #213 from permitio/omer/per-11073-fix-bulk-actions…
Browse files Browse the repository at this point in the history
…-factdb

support full delta operation generation for factdb
  • Loading branch information
omer9564 authored Nov 10, 2024
2 parents 631dca7 + afbc846 commit 58fe403
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions horizon/data_manager/policy_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,30 @@ def _generate_operations(
self, parts: list[str], data: JsonableValue
) -> Iterator[AnyOperation]:
match parts:
case ["relationships"]:
for obj, _data in data.items():
yield from _get_operations_for_update_relationship_tuple(obj, _data)
case ["relationships", obj]:
yield from _get_operations_for_update_relationship_tuple(obj, data)
case ["role_assignments"]:
for full_user_key, _data in data.items():
yield from _get_operations_for_update_role_assigment(
full_user_key, _data
)
case ["role_assignments", full_user_key]:
yield from _get_operations_for_update_role_assigment(
full_user_key, data
)
case ["users"]:
for user_key, _data in data.items():
yield from _get_operations_for_update_user(user_key, _data)
case ["users", user_key]:
yield from _get_operations_for_update_user(user_key, data)
case ["resource_instances"]:
for instance_key, _data in data.items():
yield from _get_operations_for_update_resource_instance(
instance_key, _data
)
case ["resource_instances", instance_key]:
yield from _get_operations_for_update_resource_instance(
instance_key, data
Expand Down

0 comments on commit 58fe403

Please sign in to comment.