Skip to content

Make Visibility Rules apply to Client Entities as well #709

Description

@malfuu

As discussed in #708 , the high level visibility API does not apply to client entities.
(I am defining client entities as: representation of clients added by a replicon backend in the server)
For example: Replicated client entity A has IPAddress component only visible to client entity B with Admin component

I see this as an incosistency, and would prefer if clients could be occluded as well.
VisibilityFilters applied on clients could be interesting in scenarios such as:

  • purposefully hiding client entities (e.g. ghosting admins)
  • not exposing sensitive client information to all clients (e.g. ip address only accessible to admins)
  • and arguably most important: consistency on visibility across all replicated entities

This behavior is mostly caused by queries not expecting client entities for visibility.
Relevant functions:

The culprit for this behaviour is the usage of Without<ClientVisibility> query filter.
Personal attempts of removing this filter (+ some extra code) yielded good results in hiding clients.
I think its safe, visibility mostly works on immutable borrows of components -- but its very possible there is some footgun I have planted somewhere.

I wanted to see if you were willing to consider this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions