pub fn requires_repository_check(
caller: &AcpCaller,
requested: Option<Uuid>,
) -> Result<Option<Uuid>, ScopeGuardError>Expand description
Decide whether the caller is allowed to attach the requested scope id, without hitting the DB. Returns:
Ok(None): caller has no requested scope → no enforcement neededOk(Some(acp_id)): the middleware must consult the use-case to verifyassert_caller_can_see(acp_id)Err(Validation): the caller is non-admin AND owns no role-scope information (e.g. syndic withorganization_id = NoneAND no explicit acp_id) — refuse rather than guess.