pub struct ResourceAuthorization { /* private fields */ }Expand description
Authorization policy that maps route patterns to allowed roles and permissions.
resource_key→allowed_roles: users with ANY of these roles are granted access.resource_key→required_permissions: users with ANY of these permissions are granted access.
A user is authorized if they have at least one matching role OR at least one matching permission.
Implementations§
Source§impl ResourceAuthorization
impl ResourceAuthorization
Trait Implementations§
Source§impl Default for ResourceAuthorization
impl Default for ResourceAuthorization
Source§impl IAuthorizationPolicy for ResourceAuthorization
impl IAuthorizationPolicy for ResourceAuthorization
Check if the authenticated user can access the resource. Read more
Auto Trait Implementations§
impl Freeze for ResourceAuthorization
impl RefUnwindSafe for ResourceAuthorization
impl Send for ResourceAuthorization
impl Sync for ResourceAuthorization
impl Unpin for ResourceAuthorization
impl UnsafeUnpin for ResourceAuthorization
impl UnwindSafe for ResourceAuthorization
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