public boolean keyRecoveryPossible(CertificateView certificatedata) throws Exception{ boolean returnval = true; if(informationmemory.getGlobalConfiguration().getEnableEndEntityProfileLimitations()){ UserDataVO data = adminsession.findUser(administrator, certificatedata.getUsername()); if(data != null){ int profileid = data.getEndEntityProfileId(); returnval = endEntityAuthorization(administrator, profileid, AvailableAccessRules.KEYRECOVERY_RIGHTS, false); }else returnval = false; }  return returnval && keyrecoverysession.existsKeys(administrator, certificatedata.getCertificate()) && !keyrecoverysession.isUserMarked(administrator,certificatedata.getUsername());
public boolean keyRecoveryPossible(X509Certificate cert, String username) throws Exception{ boolean returnval = true;  try{ authorizationsession.isAuthorizedNoLog(administrator, AvailableAccessRules.REGULAR_KEYRECOVERY); }catch(AuthorizationDeniedException ade){ returnval = false; }  if(informationmemory.getGlobalConfiguration().getEnableEndEntityProfileLimitations()){ UserDataVO data = adminsession.findUser(administrator, username); if(data != null){ int profileid = data.getEndEntityProfileId(); returnval = endEntityAuthorization(administrator, profileid, AvailableAccessRules.KEYRECOVERY_RIGHTS, false); }else returnval = false; }  return returnval && keyrecoverysession.existsKeys(administrator, cert) && !keyrecoverysession.isUserMarked(administrator,username);
    public boolean keyRecoveryPossible(CertificateView certificatedata) throws Exception{        boolean returnval = true;        if(informationmemory.getGlobalConfiguration().getEnableEndEntityProfileLimitations()){            UserDataVO data = adminsession.findUser(administrator, certificatedata.getUsername());            if(data != null){       	                int profileid = data.getEndEntityProfileId();                returnval = endEntityAuthorization(administrator, profileid, AvailableAccessRules.KEYRECOVERY_RIGHTS, false);		              }else                returnval = false;                 }                return returnval && keyrecoverysession.existsKeys(administrator, certificatedata.getCertificate()) && !keyrecoverysession.isUserMarked(administrator,certificatedata.getUsername());    }