Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: BI-5948 pass req_model to resolve_rls_groups_for_dataset #754

Merged
merged 1 commit into from
Dec 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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