Requested changes

- only warn about failure to find a matching ePerson if canSelfRegister
is false
- tell LGTMbot everything is fine with the redirect
- remove comments about nonexistent ORCID login code
This commit is contained in:
Hardy Pottinger
2022-01-27 10:57:54 -06:00
parent b0ce61d3fe
commit ddbaabcbb5
3 changed files with 7 additions and 9 deletions

View File

@@ -137,8 +137,12 @@ public class OidcAuthenticationBean implements AuthenticationMethod {
return ePerson.canLogIn() ? logInEPerson(context, ePerson) : BAD_ARGS;
}
LOGGER.warn("Self registration is currently disabled for OIDC, and no ePerson could be found for email: {}",
email);
// if self registration is disabled, warn about this failure to find a matching eperson
if (! canSelfRegister()) {
LOGGER.warn("Self registration is currently disabled for OIDC, and no ePerson could be found for email: {}",
email);
}
return canSelfRegister() ? registerNewEPerson(context, userInfo, email) : NO_SUCH_USER;
}