Skip to content

[Feature Request] check() function support for to-many relations #1688

@jason-curtis

Description

@jason-curtis

As explained in this blog post, the check() function is a great way to simplify access rules with complex sets of models. However it is not implemented yet for to-many relations.

Describe the solution you'd like
Much like check(author) checks if the model referenced by the author field is accessible, check(children?) should check if any of the related children are accessible. Other Collection Predicate Expressions should work similarly.

Other syntax options are also discussed in the blog post and its comment thread: zenstackhq/zenstack-docs#360

Metadata

Metadata

Assignees

No one assigned

    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