pub trait ApprovalConfiguration<A, S> {
type ApprovalError;
type RemovalError;
type AuthorizationError;
type ExecutionEligibilityError;
fn is_approved_for_execution(
&self,
action_request: &ActionRequest<A, S>
) -> Result<(), Self::ExecutionEligibilityError>;
fn is_removable(
&self,
action_request: &ActionRequest<A, S>
) -> Result<(), Self::RemovalError>;
fn is_account_authorized(
&self,
account_id: &AccountId,
action_request: &ActionRequest<A, S>
) -> Result<(), Self::AuthorizationError>;
fn try_approve_with_authorized_account(
&self,
account_id: AccountId,
action_request: &mut ActionRequest<A, S>
) -> Result<(), Self::ApprovalError>;
}
Expand description
Defines the operating parameters for an ApprovalManager and performs approvals
Required Associated Types§
sourcetype ApprovalError
type ApprovalError
Errors when approving a request
sourcetype RemovalError
type RemovalError
Errors when removing a request
sourcetype AuthorizationError
type AuthorizationError
Errors when authorizing an account
sourcetype ExecutionEligibilityError
type ExecutionEligibilityError
Errors when evaluating a request for execution candidacy
Required Methods§
sourcefn is_approved_for_execution(
&self,
action_request: &ActionRequest<A, S>
) -> Result<(), Self::ExecutionEligibilityError>
fn is_approved_for_execution(
&self,
action_request: &ActionRequest<A, S>
) -> Result<(), Self::ExecutionEligibilityError>
Has the request reached full approval?
sourcefn is_removable(
&self,
action_request: &ActionRequest<A, S>
) -> Result<(), Self::RemovalError>
fn is_removable(
&self,
action_request: &ActionRequest<A, S>
) -> Result<(), Self::RemovalError>
Can this request be removed by an allowed account?
Is the account allowed to execute, approve, or remove this request?
Modify action_request.approval_state in-place to increase approval