Skip to content

List of models where root or descendants have a condition applied #312

@HelenaGwyn

Description

@HelenaGwyn

Hi

I need some help figuring out if and how this is possible.

I have a list of recursive messages.

Each message has an array of ids of groups of users that can read the message stored in a json-array.
I want a list of all the root-messages (with parent_id null) and their descendants (not as a tree) with a condition whereRaw(JSON_OVERLAPS...) for the readrights where the root, one of the descendants or both can be read.
It has to be possible to show a descendant without having the right to read the root. In the interface the root will be shown without content.

Each message can also be pinned.
On top of the rights I would also like to check or filter whether the root or one of the descendants is pinned.
The whole messagethread will then be pinned in the interface.

Can this be done somehow?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions