use std::collections::HashMap;
pub struct Role;
impl Role {
pub const ADMIN: &'static str = "admin";
pub const DEV: &'static str = "dev";
pub const MANAGER: &'static str = "manager";
pub const SERVICE: &'static str = "service";
pub fn is_role(role_map: &HashMap<String, bool>, role_name: &'static str) -> bool {
match role_map.get(role_name) {
None => false,
Some(map) => *map,
}
}
}