pub struct IsAuthenticated;Trait Implementations§
Source§impl Clone for IsAuthenticated
impl Clone for IsAuthenticated
impl Copy for IsAuthenticated
Source§impl Debug for IsAuthenticated
impl Debug for IsAuthenticated
Source§impl Default for IsAuthenticated
impl Default for IsAuthenticated
Source§impl<M: Model> Permission<M> for IsAuthenticated
impl<M: Model> Permission<M> for IsAuthenticated
Source§fn object_scoped(&self) -> bool
fn object_scoped(&self) -> bool
Custom policies are scoped by default; global policies explicitly opt out.
Object-scoped policies cannot expose the whole-model protocol-2 journal.
async fn check_request( &self, _state: PermissionContext<'_>, current: Option<&CurrentPrincipal>, _action: ViewAction, ) -> AppResult<()>
Source§fn scope(
&self,
context: PermissionContext<'_>,
current: Option<&CurrentPrincipal>,
action: ViewAction,
) -> impl Future<Output = AppResult<Option<Expr>>> + Send
fn scope( &self, context: PermissionContext<'_>, current: Option<&CurrentPrincipal>, action: ViewAction, ) -> impl Future<Output = AppResult<Option<Expr>>> + Send
SQL restriction applied before counting, paging, and loading an object.
Object-scoped policies must override this method; the default fails closed.
fn check_object( &self, context: PermissionContext<'_>, current: Option<&CurrentPrincipal>, action: ViewAction, model: &M, ) -> impl Future<Output = AppResult<()>> + Send
Source§fn check_write(
&self,
context: PermissionContext<'_>,
current: Option<&CurrentPrincipal>,
action: ViewAction,
model: Option<&M>,
_write: Option<&ValidatedWrite<M>>,
) -> impl Future<Output = AppResult<()>> + Send
fn check_write( &self, context: PermissionContext<'_>, current: Option<&CurrentPrincipal>, action: ViewAction, model: Option<&M>, _write: Option<&ValidatedWrite<M>>, ) -> impl Future<Output = AppResult<()>> + Send
Runs after server-owned fields have been prepared and inside the write transaction.
Source§fn after_write(
&self,
_context: PermissionContext<'_>,
_current: Option<&CurrentPrincipal>,
_action: ViewAction,
_model: &M,
) -> impl Future<Output = AppResult<()>> + Send
fn after_write( &self, _context: PermissionContext<'_>, _current: Option<&CurrentPrincipal>, _action: ViewAction, _model: &M, ) -> impl Future<Output = AppResult<()>> + Send
Allows application-owned initialization such as creator grants in the same commit.
fn validate(&self, _fields: &[SerializerField]) -> AppResult<()>
Source§fn model_access_key(&self) -> Option<&'static str>
fn model_access_key(&self) -> Option<&'static str>
Stable model identity used to reject accidental ACL namespace collisions.
Auto Trait Implementations§
impl Forget for IsAuthenticated
impl Freeze for IsAuthenticated
impl Move for IsAuthenticated
impl RefUnwindSafe for IsAuthenticated
impl Send for IsAuthenticated
impl Sync for IsAuthenticated
impl Unpin for IsAuthenticated
impl UnsafeUnpin for IsAuthenticated
impl UnwindSafe for IsAuthenticated
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