Skip to content

Commit

Permalink
refactor: BI-5948 pass req_model to resolve_rls_groups_for_dataset (#754
Browse files Browse the repository at this point in the history
)
  • Loading branch information
MCPN authored Dec 26, 2024
1 parent ab9c166 commit 9caa02b
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,11 @@ async def try_save_dataset_to_cache(
return None
await mutation_cache.save_mutation_cache(dataset, mutation_key)

async def resolve_rls_groups_for_dataset(self, services_registry: ApiServiceRegistry) -> None:
async def resolve_rls_groups_for_dataset(
self,
req_model: DataRequestModel,
services_registry: ApiServiceRegistry,
) -> None:
if not any(item.subject.subject_type == RLSSubjectType.group for item in self.dataset.rls.items):
return # no groups in the RLS config, no need to resolve

Expand Down Expand Up @@ -298,7 +302,7 @@ async def prepare_dataset_for_request(
dataset_data=req_model.dataset,
allow_rls_change=allow_rls_change,
)
await self.resolve_rls_groups_for_dataset(services_registry)
await self.resolve_rls_groups_for_dataset(req_model, services_registry)

if cached_dataset:
await self.check_for_notifications(services_registry, us_manager)
Expand Down

0 comments on commit 9caa02b

Please sign in to comment.