Skip to content

Add the customization for the TenantHasAuthoritiesFunctionDefinitionEnricher type to simplify policy conditions #226

@starnowski

Description

@starnowski

Add the customization for the TenantHasAuthoritiesFunctionDefinitionEnricher type to simplify policy conditions.

AC:
The goal is to add new type that implements com.github.starnowski.posmulten.postgresql.core.rls.TenantHasAuthoritiesFunctionInvocationFactory.
The returnTenantHasAuthoritiesFunctionInvocation method should return a simple condition statement that compares tenant column id with the value from a function that returns the current tenant value.
For example:
tenant_id = get_current_tenant_id()
Generated policies should look like below:
USING (tenant_id = get_current_tenant_id())
WITH CHECK (tenant_id = get_current_tenant_id());

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions