Skip to main content

member_granted_source_is_safe

Function member_granted_source_is_safe 

Source
fn member_granted_source_is_safe(
    source_overwrites: &[PermissionOverwrite],
    dest_roles: &HashSet<RoleId>,
    everyone_role_id: RoleId,
) -> bool
Expand description

Returns true when a source channel that grants access through per-member overwrites may still be expanded into the target described by dest_roles.

Members holding such a grant are not represented in the source’s role set, so the subset comparison in check_visibility says nothing about whether they can view the target. The only target they are provably allowed to see is one @everyone can view — which, since viewing_roles treats @everyone as an ordinary role, is exactly dest_roles containing it.

Sources without such a grant are fully described by their role set and are left to the subset comparison.