Changeset 35507 for main/trunk
- Timestamp:
- 2021-09-28T12:16:22+13:00 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/LibraryServlet.java
r35362 r35507 839 839 xml_request.setAttribute("baseURL", baseURL); 840 840 841 logger.error("about to process this message");842 logger.error(XMLConverter.getPrettyString(xml_message));841 // logger.error("about to process this message"); 842 // logger.error(XMLConverter.getPrettyString(xml_message)); 843 843 Node xml_result = this.recept.process(xml_message); 844 844 encodeURLs(xml_result, response); … … 975 975 private boolean processLoginChanges(HttpServletRequest request, UserContext userContext, PrintWriter out, String baseURL, Map<String, String[]> queryMap, String lang, String output) throws ServletException { 976 976 977 logger.error("kk in processLoginChanges");978 977 //Check if we need to login or logout 979 978 String username = getFirstParam(GSParams.USERNAME, queryMap); … … 983 982 if (logout != null) 984 983 { 985 logger.error("plc logging out");986 984 request.logout(); 987 985 } … … 989 987 if (username != null && password != null) 990 988 { 991 logger.error("kk plc u&p not null");992 989 //We are changing to another user, so log out first 993 990 if (request.getAuthType() != null) 994 991 { 995 logger.error("plc logging out 2");996 992 request.logout(); 997 993 } … … 1003 999 password = Authentication.hashPassword(password); 1004 1000 request.login(username, password); 1005 logger.error("plc logged in"); 1006 } 1001 } 1007 1002 catch (Exception ex) 1008 1003 { … … 1012 1007 String siteName = (String) this.recept.getConfigParams().get(GSConstants.SITE_NAME); 1013 1008 request.login(siteName + "-" + username, password); 1014 logger.error("plc logged in site wide");1009 1015 1010 } 1016 1011 catch (Exception exc) … … 1039 1034 private void updateUserContextWithAuthenticatedInfo(HttpServletRequest request, UserContext userContext) 1040 1035 { 1041 logger.error("in updateUserContext");1036 1042 1037 //Get the username 1043 1038 String user_name = request.getUserPrincipal().getName(); 1044 1039 userContext.setUsername(user_name); 1045 logger.error("setting username = "+request.getUserPrincipal().getName()); 1040 1046 1041 //Get the groups for the user 1047 1042 Document msg_doc = XMLConverter.newDOM(); … … 1081 1076 1082 1077 private boolean runCollectionSecurityCheck(HttpServletRequest request, UserContext userContext, PrintWriter out, String baseURL, String collection, String document, String lang, String output) { 1083 logger.error("kk in a coll"+collection); 1078 1084 1079 //Get the security info for this collection 1085 1080 Document msg_doc = XMLConverter.newDOM(); … … 1117 1112 if (!found) 1118 1113 { 1119 logger.error("kk current user not allowed to access"); 1114 1120 1115 String error_message = ""; 1121 1116 if (request.getAuthType() == null)
Note:
See TracChangeset
for help on using the changeset viewer.