Skip to content

RLS: Implement view expansion #2442

@joshua-spacetime

Description

@joshua-spacetime

Expanding a table reference into its RLS definition during query compilation. For example, if you have the following RLS rule:

/// A user only has access to their row
#[spacetimedb::client_visibility_filter]
const USER_FILTER: Filter = Filter::Sql("
    SELECT * FROM user WHERE identity = @sender
");

The query SELECT * FROM user will be expanded into:

SELECT * FROM (SELECT * FROM user WHERE identity = @sender)

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions