Skip to main content

parse_codename

Function parse_codename 

Source
pub fn parse_codename(codename: &str) -> Option<(String, Action)>
Expand description

Reverse mapping: given a codename, find the matching (key, action) pair so existing role grants can be rendered as pre-checked matrix cells. Returns None if the codename doesn’t match any registered resource (e.g. a legacy free-form codename the admin hasn’t migrated yet).