casbin::function_map

Function key_match5

Source
pub fn key_match5(key1: &str, key2: &str) -> bool
Expand description

KeyMatch5 determines whether key1 matches the pattern of key2 (similar to RESTful path), key2 can contain a *
For example,

  • “/foo/bar?status=1&type=2” matches “/foo/bar”
  • “/parent/child1” and “/parent/child1” matches “/parent/*”
  • “/parent/child1?status=1” matches “/parent/*”.