Skip to main content

PolicyChecker

Trait PolicyChecker 

Source
pub trait PolicyChecker: Send + Sync {
    // Required method
    fn check(&self, subject: &str, resource: &str, operation: &str) -> bool;
}
Expand description

Trait for policy checking (allows mocking in tests)

Required Methods§

Source

fn check(&self, subject: &str, resource: &str, operation: &str) -> bool

Check if the subject is allowed to perform the operation on the resource

Implementors§