Skip to main content

bctx_conductor/policy/
capability.rs

1pub struct CapabilitySet(pub Vec<String>);
2
3impl CapabilitySet {
4    pub fn all() -> Self {
5        Self(Vec::new())
6    }
7    pub fn allows(&self, skill: &str) -> bool {
8        self.0.is_empty() || self.0.iter().any(|s| s == skill)
9    }
10}