pub struct IsAdminUser;Trait Implementations§
Source§impl Clone for IsAdminUser
impl Clone for IsAdminUser
impl Copy for IsAdminUser
Source§impl Debug for IsAdminUser
impl Debug for IsAdminUser
Source§impl Default for IsAdminUser
impl Default for IsAdminUser
Source§impl<M: Model> Permission<M> for IsAdminUser
impl<M: Model> Permission<M> for IsAdminUser
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 IsAdminUser
impl Freeze for IsAdminUser
impl Move for IsAdminUser
impl RefUnwindSafe for IsAdminUser
impl Send for IsAdminUser
impl Sync for IsAdminUser
impl Unpin for IsAdminUser
impl UnsafeUnpin for IsAdminUser
impl UnwindSafe for IsAdminUser
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