if(!profileauthproxy.getEndEntityProfileAuthorization(admin, data1.getEndEntityProfileId(),EndEntityProfileAuthorizationProxy.DELETE_RIGHTS)){
if(!profileauthproxy.getEndEntityProfileAuthorization(admin, data1.getEndEntityProfileId(),EndEntityProfileAuthorizationProxy.DELETE_RIGHTS, LogEntry.MODULE_RA)){
    public void deleteUser(Admin admin, String username) throws AuthorizationDeniedException, RemoteException{        debug(">deleteUser("+username+")");        // Check if administrator is authorized to delete user.        if(globalconfiguration.getEnableEndEntityProfileLimitations()){          try{            UserDataPK pk = new UserDataPK(username);            UserDataLocal data1 = home.findByPrimaryKey(pk);                 if(!profileauthproxy.getEndEntityProfileAuthorization(admin, data1.getEndEntityProfileId(),EndEntityProfileAuthorizationProxy.DELETE_RIGHTS)){                logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),username, null, LogEntry.EVENT_ERROR_DELETEENDENTITY,"Administrator not authorized");                                     throw new AuthorizationDeniedException("Administrator not authorized to delete user.");             }              }          catch(FinderException e){            logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),username, null, LogEntry.EVENT_ERROR_DELETEENDENTITY,"Couldn't find username in database");                           throw new EJBException(e.getMessage());                      }            }          try {            UserDataPK pk = new UserDataPK(username);            home.remove(pk);            logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),username, null, LogEntry.EVENT_INFO_DELETEDENDENTITY,"");        }        catch (Exception e) {            logsession.log(admin, LogEntry.MODULE_RA, new java.util.Date(),username, null, LogEntry.EVENT_ERROR_DELETEENDENTITY,"");            throw new EJBException(e.getMessage());        }        debug("<deleteUser("+username+")");    } // deleteUser