Skip to main content

parse_roles

Function parse_roles 

Source
pub fn parse_roles(roles: &str) -> Box<[Box<str>]>
Expand description

Parse a comma-separated role list into the shape AuthCtx::roles expects.

Empty segments are dropped, because "".split(',') yields one empty item and a "" entry reads as “has a role” in file_access::role_access_level, granting every federated stranger access to tenant-owned files. Every conversion from a stored/claimed role string to Box<[Box<str>]> must go through here.