Skip to main content

TeamAccess

Trait TeamAccess 

Source
pub trait TeamAccess: Send + Sync {
    // Required methods
    fn team_exists(&self, team: &str) -> bool;
    fn is_member(&self, team: &str, user: &str) -> bool;
}
Expand description

Read-only access to daemon-level team membership.

Plugins use this trait to check whether a user belongs to a team without depending on room-daemon or UserRegistry directly. The broker provides a concrete implementation backed by the registry; standalone mode passes None (no team checking available).

Required Methods§

Source

fn team_exists(&self, team: &str) -> bool

Returns true if the named team exists in the registry.

Source

fn is_member(&self, team: &str, user: &str) -> bool

Returns true if user is a member of team.

Implementors§