final int numOfReqApprovals = getNumOfApprovalRequired(admin, CAInfo.REQ_APPROVAL_REVOCATION, caid, userData.getCertificateProfileId());
if (numOfReqApprovals > 0) {
final RevocationApprovalRequest ar = new RevocationApprovalRequest(false, username, reason, admin, numOfReqApprovals, caid, userData.getEndEntityProfileId());
if (ApprovalExecutorUtil.requireApproval(ar, NONAPPROVABLECLASSNAMES_REVOKEUSER)) {
approvalSession.addApprovalRequest(admin, ar, getGlobalConfiguration(admin));
throw new WaitingForApprovalException(intres.getLocalizedMessage("ra.approvalrevoke"));
}
}
// Revoke all certs, one at the time
final Collection<Certificate> certs = certificateStoreSession.findCertificatesByUsername(admin, username);
for (final Certificate cert : certs) {