pub fn check_program_allowed(
account: &AccountView,
allowed: &[Address],
) -> ProgramResultExpand description
Verify the account is owned by one of the programs in allowed.
Use this when accepting accounts from a known set of trusted programs. Rejects anything not in the list.
ⓘ
const ALLOWED: &[Address] = &[PROGRAM_A, PROGRAM_B];
check_program_allowed(account, ALLOWED)?;