NIHVIVO-1207 improve log messages in Authenticate.
This commit is contained in:
parent
d22657b1c8
commit
8b2e38abca
1 changed files with 2 additions and 4 deletions
|
@ -401,13 +401,11 @@ public class Authenticate extends FreemarkerHttpServlet {
|
||||||
List<String> uris = userDao.getIndividualsUserMayEditAs(user
|
List<String> uris = userDao.getIndividualsUserMayEditAs(user
|
||||||
.getURI());
|
.getURI());
|
||||||
if (uris != null && uris.size() > 0) {
|
if (uris != null && uris.size() > 0) {
|
||||||
log.debug("User is logged in. Redirect as self-editor to "
|
|
||||||
+ sessionRedirect);
|
|
||||||
String userHomePage = request.getContextPath()
|
String userHomePage = request.getContextPath()
|
||||||
+ "/individual?uri="
|
+ "/individual?uri="
|
||||||
+ URLEncoder.encode(uris.get(0), "UTF-8");
|
+ URLEncoder.encode(uris.get(0), "UTF-8");
|
||||||
log.debug("User is logged in. Redirect as self-editor to "
|
log.debug("User is logged in. Redirect as self-editor to "
|
||||||
+ sessionRedirect);
|
+ userHomePage);
|
||||||
response.sendRedirect(userHomePage);
|
response.sendRedirect(userHomePage);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -423,7 +421,7 @@ public class Authenticate extends FreemarkerHttpServlet {
|
||||||
* There has been an unexpected exception. Complain mightily.
|
* There has been an unexpected exception. Complain mightily.
|
||||||
*/
|
*/
|
||||||
private void showSystemError(Exception e, HttpServletResponse response) {
|
private void showSystemError(Exception e, HttpServletResponse response) {
|
||||||
log.error("Unexpected error in login process" + e);
|
log.error("Unexpected error in login process", e);
|
||||||
try {
|
try {
|
||||||
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
|
response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
|
||||||
} catch (IOException e1) {
|
} catch (IOException e1) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue