pub struct StandardPolicies;Expand description
Standard policies for each role.
Implementations§
Source§impl StandardPolicies
impl StandardPolicies
Sourcepub fn admin() -> AccessPolicy
pub fn admin() -> AccessPolicy
Creates the standard policy for an Admin role.
Access:
- All streams (no restrictions)
- All columns (no restrictions)
- No row filters (sees all data)
Sourcepub fn analyst() -> AccessPolicy
pub fn analyst() -> AccessPolicy
Creates the standard policy for an Analyst role.
Access:
- All non-audit streams
- All columns except PII (depends on data class)
- No row filters (cross-tenant read)
Sourcepub fn user(tenant_id: TenantId) -> AccessPolicy
pub fn user(tenant_id: TenantId) -> AccessPolicy
Creates the standard policy for a User role.
Access:
- Streams matching tenant ID
- All columns (within tenant)
- Row filter:
tenant_id= <user’s tenant>
Sourcepub fn auditor() -> AccessPolicy
pub fn auditor() -> AccessPolicy
Creates the standard policy for an Auditor role.
Access:
- Audit logs only
- All audit log columns
- No row filters (sees all audit entries)
Auto Trait Implementations§
impl Freeze for StandardPolicies
impl RefUnwindSafe for StandardPolicies
impl Send for StandardPolicies
impl Sync for StandardPolicies
impl Unpin for StandardPolicies
impl UnsafeUnpin for StandardPolicies
impl UnwindSafe for StandardPolicies
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more