Skip to content

Support allowMaterializedViewsWithoutRowLevelSecurity on RLS policies#147

Merged
ashleyvansp merged 5 commits intomainfrom
ashleyvansp/allowMaterializedViewsWithoutRowLevelSecurity
Feb 26, 2026
Merged

Support allowMaterializedViewsWithoutRowLevelSecurity on RLS policies#147
ashleyvansp merged 5 commits intomainfrom
ashleyvansp/allowMaterializedViewsWithoutRowLevelSecurity

Conversation

@ashleyvansp
Copy link
Copy Markdown
Contributor

@ashleyvansp ashleyvansp commented Feb 26, 2026

This pull request adds support for the AllowMaterializedViewsWithoutRowLevelSecurity flag on row level security policies.

cc https://github.com/github/data/issues/9480

Copilot AI review requested due to automatic review settings February 26, 2026 19:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for the allowMaterializedViewsWithoutRowLevelSecurity option when handling row-level security (RLS) policies, so the tool can round-trip this setting between Kusto and the YAML/model representation.

Changes:

  • Extend table RLS loading to detect and persist allowMaterializedViewsWithoutRowLevelSecurity.
  • Migrate the newly loaded flag from legacy Table fields into the unified Policies model during cleanup.
  • Emit the with (allowMaterializedViewsWithoutRowLevelSecurity=true) clause when generating RLS enable scripts.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
KustoSchemaTools/Parser/KustoLoader/KustoTableBulkLoader.cs Attempts to detect/remove the new with (...) clause when parsing .show database schema as csl script for table RLS.
KustoSchemaTools/Parser/DatabaseCleanup.cs Copies the loaded legacy flag into policy.AllowMaterializedViewsWithoutRowLevelSecurity.
KustoSchemaTools/Model/Table.cs Adds an obsolete legacy field to temporarily hold the loaded flag before consolidation into Policies.
KustoSchemaTools/Model/Policy.cs Adds the flag to policies and emits the with (...) clause when generating RLS scripts.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown

@whitleykeith whitleykeith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙈 ✅

@ashleyvansp ashleyvansp merged commit e51d556 into main Feb 26, 2026
5 checks passed
@ashleyvansp ashleyvansp deleted the ashleyvansp/allowMaterializedViewsWithoutRowLevelSecurity branch February 26, 2026 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants