Skip to main content

cache_for_role

Function cache_for_role 

Source
pub fn cache_for_role(
    cache: &SchemaCache,
    names: &NameOverrides,
    role: &str,
    backend: bool,
) -> SchemaCache
Expand description

Reduce a schema cache to what one role may see.

Returns the cache unchanged when the document grants that role nothing to narrow – which is the case for admin, and for every role when the document carries no permissions at all.