pub struct AccessScopeResolver { /* private fields */ }Implementations§
Source§impl AccessScopeResolver
impl AccessScopeResolver
Sourcepub fn include_accessible_tenants(self, tenants: Vec<Uuid>) -> Self
pub fn include_accessible_tenants(self, tenants: Vec<Uuid>) -> Self
Include a list of accessible tenant IDs in the scope.
Use this method when the caller has already resolved which tenants
the current security context can access (typically via TenantResolverGatewayClient).
§Example
ⓘ
// Fetch accessible tenants from resolver
let accessible = resolver.get_accessible_tenants(&ctx, query).await?;
let tenant_ids: Vec<Uuid> = accessible.items.iter().map(|t| t.id).collect();
// Build scope with accessible tenants
let scope = ctx
.scope(policy_engine)
.include_accessible_tenants(tenant_ids)
.prepare()
.await?;pub fn include_resource_ids(&self) -> &Self
Auto Trait Implementations§
impl Freeze for AccessScopeResolver
impl !RefUnwindSafe for AccessScopeResolver
impl Send for AccessScopeResolver
impl Sync for AccessScopeResolver
impl Unpin for AccessScopeResolver
impl !UnwindSafe for AccessScopeResolver
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