Skip to main content

approve_custodian_study_access_request

Function approve_custodian_study_access_request 

Source
pub fn approve_custodian_study_access_request(
    custodian_port: &mut dyn CustodianStudyAccessRequestPort,
    workflow_entry_port: &mut dyn StudyAccessRequestWorkflowEntryPort,
    approval: ApproveCustodianStudyAccessRequest,
) -> Result<CustodianStudyAccessRequest, CustodianStudyAccessRequestError>
Expand description

Approves a pending Study access request in three ordered steps: verify the authenticated custodian’s scoped request, provision or reuse requester workflow entry in that request’s datastore, then record the governed Study-access grant and decision. If the final step fails, workflow entry is deliberately retained; a retry safely provisions it again and re-runs only the governed decision without attempting compensation.