boolean authorized = true; if(informationmemory.getGlobalConfiguration().getEnableEndEntityProfileLimitations()){ int profileid = adminsession.findUser(administrator, certificatedata.getUsername()).getEndEntityProfileId(); authorized = endEntityAuthorization(administrator, profileid, AvailableAccessRules.KEYRECOVERY_RIGHTS, false); }  if(authorized){ keyrecoverysession.markAsRecoverable(administrator, certificatedata.getCertificate()); adminsession.setUserStatus(administrator, certificatedata.getUsername(),UserDataLocal.STATUS_KEYRECOVERY); }
boolean authorized = true; if(informationmemory.getGlobalConfiguration().getEnableEndEntityProfileLimitations()){ int profileid = adminsession.findUser(administrator, certificatedata.getUsername()).getEndEntityProfileId(); authorized = endEntityAuthorization(administrator, profileid, AvailableAccessRules.KEYRECOVERY_RIGHTS, false); }  if(authorized){ keyrecoverysession.markAsRecoverable(administrator, certificatedata.getCertificate()); adminsession.setUserStatus(administrator, certificatedata.getUsername(),UserDataConstants.STATUS_KEYRECOVERY); }
    public void markForRecovery(CertificateView certificatedata) throws Exception{      boolean authorized = true;      if(informationmemory.getGlobalConfiguration().getEnableEndEntityProfileLimitations()){        int profileid = adminsession.findUser(administrator, certificatedata.getUsername()).getEndEntityProfileId();        authorized = endEntityAuthorization(administrator, profileid, AvailableAccessRules.KEYRECOVERY_RIGHTS, false);      }      if(authorized){        keyrecoverysession.markAsRecoverable(administrator, certificatedata.getCertificate());        adminsession.setUserStatus(administrator, certificatedata.getUsername(),UserDataLocal.STATUS_KEYRECOVERY);      }    }