Skip to content

Commit

Permalink
Removing V3_DISABLE_RELEASE_CANDIDATES, V2_DISABLE_RELEASE_CANDIDATES…
Browse files Browse the repository at this point in the history
… and HTTPS_IDS
  • Loading branch information
amontenegro committed Dec 12, 2023
1 parent ad5a15f commit a3f37fd
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 32 deletions.
9 changes: 0 additions & 9 deletions orcid-core/src/main/java/org/orcid/core/togglz/Features.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ public enum Features implements Feature {
@Label("Affiliation search")
AFFILIATION_SEARCH,

@Label("Https for links to iDs")
HTTPS_IDS,

@Label("Arabic translation")
LANG_AR,

Expand Down Expand Up @@ -129,12 +126,6 @@ public enum Features implements Feature {
@Label("Works failure debug")
WORKS_FAILURE_DEBUG,

@Label("Disable the 2.0 release candidates")
V2_DISABLE_RELEASE_CANDIDATES,

@Label("Disable the 3.0 release candidates")
V3_DISABLE_RELEASE_CANDIDATES,

@Label("ID token 24 hours lifespan")
ID_TOKEN_24_HOURS_LIFESPAN,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.net.URI;
import java.net.URISyntaxException;

import org.orcid.core.togglz.Features;
import org.orcid.jaxb.model.v3.release.common.OrcidIdentifier;
import org.springframework.beans.factory.annotation.Value;

Expand All @@ -14,10 +13,7 @@ public class OrcidIdentifierUtils {

public OrcidIdentifier buildOrcidIdentifier(String orcid) {
OrcidIdentifier identifier = new OrcidIdentifier();
String correctedBaseUri = baseUri;
if(!Features.HTTPS_IDS.isActive()) {
correctedBaseUri = correctedBaseUri.replace("https", "http");
}
String correctedBaseUri = baseUri;
try {
URI uri = new URI(correctedBaseUri);
identifier.setHost(uri.getHost());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,12 +287,7 @@ public String getMaintenanceMessage() {
}

protected String getSearchBaseUrl() {
String pubBaseUri = orcidUrlManager.getPubBaseUrl();
if(Features.HTTPS_IDS.isActive()) {
return pubBaseUri + "/v3.0/search/";
} else {
return pubBaseUri + "/v1.2/search/orcid-bio/";
}
return orcidUrlManager.getPubBaseUrl() + "/v3.0/search/";
}

class ConfigDetails {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,18 +516,7 @@ public ModelAndView verifyEmail(HttpServletRequest request, HttpServletResponse
}

return new ModelAndView(redirect);
}

private Search findPotentialDuplicatesByFirstNameLastName(String firstName, String lastName) {
LOGGER.debug("About to search for potential duplicates during registration for first name={}, last name={}", firstName, lastName);
SearchOrcidSolrCriteria queryForm = new SearchOrcidSolrCriteria();
queryForm.setGivenName(firstName);
queryForm.setFamilyName(lastName);
Search visibleProfiles = orcidSearchManager.findOrcidsByQuery(queryForm.deriveQueryString(), DUP_SEARCH_START, DUP_SEARCH_ROWS);
LOGGER.debug("Found {} potential duplicates during registration for first name={}, last name={}",
new Object[] { visibleProfiles.getNumFound(), firstName, lastName });
return visibleProfiles;
}
}

private void createMinimalRegistrationAndLogUserIn(HttpServletRequest request, HttpServletResponse response, Registration registration,
boolean usedCaptchaVerification, Locale locale, String ip) {
Expand Down

0 comments on commit a3f37fd

Please sign in to comment.