pub struct PermitAllResourcePolicy<E> { /* private fields */ }Expand description
Permits every action for every caller. Use as the generated default — replace in custom decorators.
Implementations§
Source§impl<E> PermitAllResourcePolicy<E>
impl<E> PermitAllResourcePolicy<E>
Trait Implementations§
Source§impl<E> Default for PermitAllResourcePolicy<E>
impl<E> Default for PermitAllResourcePolicy<E>
Source§impl<E: Send + Sync + 'static> ResourcePolicy<E> for PermitAllResourcePolicy<E>
impl<E: Send + Sync + 'static> ResourcePolicy<E> for PermitAllResourcePolicy<E>
fn can<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_action: ResourceAction,
_entity: &'life1 E,
_ctx: &'life2 AuthContext,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn resource_type() -> &'static strwhere
Self: Sized,
fn resource_type() -> &'static strwhere
Self: Sized,
The resource type name used in permission strings. Read more
Source§fn create_permission() -> &'static strwhere
Self: Sized,
fn create_permission() -> &'static strwhere
Self: Sized,
Permission string required to create this resource.
Source§fn read_permission() -> &'static strwhere
Self: Sized,
fn read_permission() -> &'static strwhere
Self: Sized,
Permission string required to read/fetch this resource.
Source§fn list_permission() -> &'static strwhere
Self: Sized,
fn list_permission() -> &'static strwhere
Self: Sized,
Permission string required to list this resource.
Source§fn update_permission() -> &'static strwhere
Self: Sized,
fn update_permission() -> &'static strwhere
Self: Sized,
Permission string required to fully update this resource.
Source§fn patch_permission() -> &'static strwhere
Self: Sized,
fn patch_permission() -> &'static strwhere
Self: Sized,
Permission string required to partially patch this resource.
Source§fn delete_permission() -> &'static strwhere
Self: Sized,
fn delete_permission() -> &'static strwhere
Self: Sized,
Permission string required to delete this resource.
Source§fn restore_permission() -> &'static strwhere
Self: Sized,
fn restore_permission() -> &'static strwhere
Self: Sized,
Permission string required to restore a soft-deleted resource.
Source§fn explicitly_disabled_actions(&self) -> Vec<ResourceAction>
fn explicitly_disabled_actions(&self) -> Vec<ResourceAction>
Optional: deny specific actions for all callers (e.g. hard-delete disabled).
Auto Trait Implementations§
impl<E> Freeze for PermitAllResourcePolicy<E>where
PhantomData<E>: Freeze,
impl<E> RefUnwindSafe for PermitAllResourcePolicy<E>where
PhantomData<E>: RefUnwindSafe,
impl<E> Send for PermitAllResourcePolicy<E>where
PhantomData<E>: Send,
impl<E> Sync for PermitAllResourcePolicy<E>where
PhantomData<E>: Sync,
impl<E> Unpin for PermitAllResourcePolicy<E>where
PhantomData<E>: Unpin,
impl<E> UnsafeUnpin for PermitAllResourcePolicy<E>where
PhantomData<E>: UnsafeUnpin,
impl<E> UnwindSafe for PermitAllResourcePolicy<E>where
PhantomData<E>: UnwindSafe,
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