Skip to main content

AccessControl

Trait AccessControl 

Source
pub trait AccessControl {
    // Required method
    fn allows(&self, path: &AttributePath, required: Privilege) -> Outcome;
}
Expand description

Who is asking, and what they may have.

A trait rather than a concrete type because the answer comes from the Access Control cluster (§9.10), which does not exist yet — and because making it a parameter is what lets §8.4.3.2’s check ordering be tested without one.

Required Methods§

Source

fn allows(&self, path: &AttributePath, required: Privilege) -> Outcome

Whether the subject holds required over this path.

§6.6.1’s subsumption is the implementor’s to apply: a subject granted Administer holds every lower privilege, which Privilege::grants expresses.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl AccessControl for AllowAll

Source§

impl<C: Config, const N: usize, const S: usize, const T: usize> AccessControl for AclAccess<'_, C, N, S, T>