Changeset 4013
- Timestamp:
- 11/12/13 16:49:14 (11 years ago)
- Location:
- DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/nb-configuration.xml
r3974 r4013 20 20 <config-files> 21 21 <config-file>src/main/resources/spring-config/applicationContext-security.xml</config-file> 22 <config-file>src/test/resources/spring-test-config/mockHttpServletRequest.xml</config-file> 23 <config-file>src/test/resources/spring-test-config/mockHttpServletResponse.xml</config-file> 24 <config-file>src/main/resources/spring-config/httpServletResponse.xml</config-file> 22 <config-file>src/main/resources/spring-config/securityDataSource.xml</config-file> 25 23 </config-files> 26 24 <config-file-groups/> -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/java/eu/dasish/annotation/backend/rest/AnnotationResource.java
r4010 r4013 113 113 } else { 114 114 try { 115 logger.error(" Unathorized-access attempt");116 httpServletResponse.sendError(HttpServletResponse.SC_ UNAUTHORIZED);115 logger.error("FORBIDDEN-access attempt"); 116 httpServletResponse.sendError(HttpServletResponse.SC_FORBIDDEN); 117 117 } catch (IOException ioe) { 118 118 logger.error("IOException: Cannot send server respond about unaithorized access."); … … 138 138 } else { 139 139 try { 140 logger.error(" Unathorized-access attempt");140 logger.error("FORBIDDEN-access attempt"); 141 141 httpServletResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED); 142 142 } catch (IOException ioe) { … … 184 184 } else { 185 185 try { 186 logger.error(" Unathorized-access attempt");186 logger.error("FORBIDDEN-access attempt"); 187 187 httpServletResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED); 188 188 } catch (IOException ioe) { … … 209 209 return result + " annotation(s) deleted."; 210 210 } else { 211 logger.error(" Unathorized-access attempt. Only the owner can delete an annotation.");211 logger.error("FORBIDDEN-access attempt. Only the owner can delete an annotation."); 212 212 try { 213 213 httpServletResponse.sendError(HttpServletResponse.SC_UNAUTHORIZED); … … 258 258 259 259 } else { 260 logger.error(" Unathorized-access attempt.");260 logger.error("FORBIDDEN-access attempt."); 261 261 logger.error("The logged-in user is not authorised to alter this annotation. "); 262 262 try { … … 288 288 289 289 } else { 290 logger.error(" Unathorized-access attempt");290 logger.error("FORBIDDEN-access attempt"); 291 291 logger.error("The logged-in user is not authorised to alter this annotation. "); 292 292 try { … … 313 313 return new ObjectFactory().createResponseBody(makePermissionResponseEnvelope(annotationID)); 314 314 } else { 315 logger.error(" Unathorized-access attempt");315 logger.error("FORBIDDEN-access attempt"); 316 316 logger.error("The logged-in user is not authorised to alter this annotation. "); 317 317 try { -
DASISH/t5.6/backend/annotator-backend/trunk/annotator-backend/src/main/resources/spring-config/applicationContext-security.xml
r3972 r4013 39 39 <authentication-manager> 40 40 <authentication-provider> 41 <user-service> 42 <user name="olha" password="adminpassword" authorities="ROLE_USER, ROLE_ADMIN" /> 43 <user name="twan" password="twanpassword" authorities="ROLE_USER" /> 44 <user name="eric" password="ericpassword" authorities="ROLE_USER" /> 45 <user name="stephanie" password="stephaniepassword" authorities="ROLE_USER" /> 46 <user name="olof" password="olofpassword" authorities="ROLE_USER" /> 47 <user name="peter" password="peterpassword" authorities="ROLE_USER" /> 48 <user name="daan" password="daanpassword" authorities="ROLE_USER" /> 49 <user name="menzo" password="menzopassword" authorities="ROLE_USER" /> 50 <user name="przemek" password="przemekpassword" authorities="ROLE_USER" /> 51 </user-service> 41 <jdbc-user-service data-source-ref="securityDataSource"/> 52 42 </authentication-provider> 53 43 </authentication-manager>
Note: See TracChangeset
for help on using the changeset viewer.