pub struct PortfolioAccessControl { /* private fields */ }Expand description
Portfolio access control
Implementations§
Source§impl PortfolioAccessControl
impl PortfolioAccessControl
pub fn new() -> Self
Sourcepub fn add_access_policy(&mut self, policy: AccessPolicy)
pub fn add_access_policy(&mut self, policy: AccessPolicy)
Register an access policy. The policy is keyed by its policy_id and
grants user_id the listed permissions over portfolio_id.
Sourcepub fn check_permission(
&self,
user_id: &str,
portfolio_id: &str,
required_permission: Permission,
) -> bool
pub fn check_permission( &self, user_id: &str, portfolio_id: &str, required_permission: Permission, ) -> bool
Return true iff some registered policy grants user_id the
required_permission on portfolio_id. No matching policy ⇒ false
(deny by default — never a fabricated grant).
pub fn add_authentication_requirement( &mut self, requirement: AuthenticationRequirement, )
pub fn get_authentication_requirement( &self, requirement_id: &str, ) -> Option<&AuthenticationRequirement>
pub fn list_authentication_requirements(&self) -> Vec<String>
pub fn is_audit_logging_enabled(&self) -> bool
pub fn set_audit_logging(&mut self, enabled: bool)
Auto Trait Implementations§
impl Freeze for PortfolioAccessControl
impl RefUnwindSafe for PortfolioAccessControl
impl Send for PortfolioAccessControl
impl Sync for PortfolioAccessControl
impl Unpin for PortfolioAccessControl
impl UnsafeUnpin for PortfolioAccessControl
impl UnwindSafe for PortfolioAccessControl
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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