pub struct AuthzPipeline { /* private fields */ }Expand description
The authorization pipeline.
Implementations§
Source§impl AuthzPipeline
impl AuthzPipeline
pub fn new() -> Self
Sourcepub fn add_restriction(&mut self, restriction: Restriction)
pub fn add_restriction(&mut self, restriction: Restriction)
Add a permanent restriction.
Sourcepub fn set_permission_handler(&mut self, handler: Box<dyn PermissionHandler>)
pub fn set_permission_handler(&mut self, handler: Box<dyn PermissionHandler>)
Set the permission handler.
Run the full authorization pipeline for an action.
Stages (in order):
- Tool exists
- Capability allows it
- Permission mode / approval
- Permanent restrictions
- Policy engine
- Executor-level validation
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AuthzPipeline
impl !RefUnwindSafe for AuthzPipeline
impl Send for AuthzPipeline
impl Sync for AuthzPipeline
impl Unpin for AuthzPipeline
impl UnsafeUnpin for AuthzPipeline
impl !UnwindSafe for AuthzPipeline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more