forked from GoogleCloudPlatform/fda-mystudies
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'early-access' into early-access-GoogleCloudPlatform#537
- Loading branch information
Showing
58 changed files
with
35,169 additions
and
29,449 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 48 additions & 48 deletions
96
WCP/fdahpStudyDesigner/src/main/webapp/WEB-INF/spring-security.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,57 @@ | ||
<beans:beans xmlns="http://www.springframework.org/schema/security" | ||
xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.springframework.org/schema/beans | ||
xmlns:beans="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.springframework.org/schema/beans | ||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | ||
http://www.springframework.org/schema/security | ||
http://www.springframework.org/schema/security/spring-security-3.2.xsd"> | ||
|
||
<!-- enable use-expressions --> | ||
<http auto-config="true" pattern="/index.jsp" security="none" | ||
disable-url-rewriting="true" /> | ||
<!-- enable use-expressions --> | ||
<http auto-config="true" pattern="/index.jsp" security="none" | ||
disable-url-rewriting="true"/> | ||
|
||
<http auto-config="true" use-expressions="true" | ||
disable-url-rewriting="true"> | ||
<http auto-config="true" use-expressions="true" | ||
disable-url-rewriting="true"> | ||
|
||
<intercept-url pattern="/adminStudies/**" | ||
access="hasAnyRole('ROLE_MANAGE_STUDIES','ROLE_CREATE_MANAGE_STUDIES','ROLE_SUPERADMIN')" /> | ||
<intercept-url pattern="/adminNotificationView/**" | ||
access="hasAnyRole('ROLE_MANAGE_APP_WIDE_NOTIFICATION_VIEW','ROLE_SUPERADMIN')" /> | ||
<intercept-url pattern="/adminNotificationEdit/**" | ||
access="hasAnyRole('ROLE_MANAGE_APP_WIDE_NOTIFICATION_EDIT','ROLE_SUPERADMIN')" /> | ||
<intercept-url pattern="/adminUsersView/**" | ||
access="hasAnyRole('ROLE_MANAGE_USERS_VIEW','ROLE_SUPERADMIN')" /> | ||
<intercept-url pattern="/adminUsersEdit/**" | ||
access="hasAnyRole('ROLE_MANAGE_USERS_EDIT','ROLE_SUPERADMIN')" /> | ||
<intercept-url pattern="/adminDashboard/**" access="permitAll" /> | ||
<intercept-url pattern="/adminStudies/**" | ||
access="hasAnyRole('ROLE_MANAGE_STUDIES','ROLE_CREATE_MANAGE_STUDIES','ROLE_SUPERADMIN')"/> | ||
<intercept-url pattern="/adminNotificationView/**" | ||
access="hasAnyRole('ROLE_MANAGE_APP_WIDE_NOTIFICATION_VIEW','ROLE_SUPERADMIN')"/> | ||
<intercept-url pattern="/adminNotificationEdit/**" | ||
access="hasAnyRole('ROLE_MANAGE_APP_WIDE_NOTIFICATION_EDIT','ROLE_SUPERADMIN')"/> | ||
<intercept-url pattern="/adminUsersView/**" | ||
access="hasAnyRole('ROLE_MANAGE_USERS_VIEW','ROLE_SUPERADMIN')"/> | ||
<intercept-url pattern="/adminUsersEdit/**" | ||
access="hasAnyRole('ROLE_MANAGE_USERS_EDIT','ROLE_SUPERADMIN')"/> | ||
<intercept-url pattern="/adminDashboard/**" access="permitAll"/> | ||
|
||
<!-- access denied page --> | ||
<access-denied-handler error-page="/unauthorized.do" /> | ||
<form-login login-page="/login.do" | ||
authentication-success-handler-ref="customSuccessHandler" | ||
authentication-failure-url="/errorRedirect.do?error=Y" | ||
username-parameter="username" password-parameter="password" /> | ||
<logout logout-success-url="/" invalidate-session="false" | ||
delete-cookies="JSESSIONID" logout-url="/sessionOut.do" /> | ||
<session-management invalid-session-url="/errorRedirect.do?error=timeout"> | ||
<concurrency-control max-sessions="1" | ||
error-if-maximum-exceeded="false" expired-url="/errorRedirect.do?error=multiUser" /> | ||
</session-management> | ||
<!-- enable csrf protection --> | ||
<csrf /> | ||
</http> | ||
<beans:bean id="authenticationProvider" | ||
class="com.fdahpstudydesigner.util.LimitLoginAuthenticationProvider"> | ||
<beans:property name="userDetailsService" ref="loginService" /> | ||
<beans:property name="passwordEncoder" ref="passwordEncoder" /> | ||
</beans:bean> | ||
<beans:bean | ||
class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder" | ||
id="passwordEncoder" /> | ||
<authentication-manager> | ||
<authentication-provider ref="authenticationProvider"> | ||
<!-- <password-encoder hash="bcrypt" /> --> | ||
</authentication-provider> | ||
</authentication-manager> | ||
<beans:bean id="customSuccessHandler" | ||
class="com.fdahpstudydesigner.util.CustomSuccessHandler" /> | ||
<!-- access denied page --> | ||
<access-denied-handler error-page="/unauthorized.do"/> | ||
<form-login login-page="/login.do" | ||
authentication-success-handler-ref="customSuccessHandler" | ||
authentication-failure-url="/errorRedirect.do?error=Y" | ||
username-parameter="username" password-parameter="password"/> | ||
<logout logout-success-url="/" invalidate-session="false" | ||
delete-cookies="JSESSIONID" logout-url="/sessionOut.do"/> | ||
<session-management invalid-session-url="/errorRedirect.do?error=timeout"> | ||
<concurrency-control max-sessions="1" | ||
error-if-maximum-exceeded="false" expired-url="/errorRedirect.do?error=multiUser"/> | ||
</session-management> | ||
<!-- enable csrf protection --> | ||
<csrf/> | ||
</http> | ||
<beans:bean id="authenticationProvider" | ||
class="com.fdahpstudydesigner.util.LimitLoginAuthenticationProvider"> | ||
<beans:property name="userDetailsService" ref="loginService"/> | ||
<beans:property name="passwordEncoder" ref="passwordEncoder"/> | ||
</beans:bean> | ||
<beans:bean | ||
class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder" | ||
id="passwordEncoder"/> | ||
<authentication-manager> | ||
<authentication-provider ref="authenticationProvider"> | ||
</authentication-provider> | ||
</authentication-manager> | ||
<beans:bean id="customSuccessHandler" | ||
class="com.fdahpstudydesigner.util.CustomSuccessHandler"/> | ||
</beans:beans> |
81 changes: 42 additions & 39 deletions
81
WCP/fdahpStudyDesigner/src/main/webapp/WEB-INF/spring-servlet.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,54 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<beans xmlns="http://www.springframework.org/schema/beans" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" | ||
xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" | ||
xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:util="http://www.springframework.org/schema/util" | ||
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:p="http://www.springframework.org/schema/p" | ||
xmlns:aop="http://www.springframework.org/schema/aop" | ||
xmlns:context="http://www.springframework.org/schema/context" | ||
xmlns:mvc="http://www.springframework.org/schema/mvc" | ||
xmlns:util="http://www.springframework.org/schema/util" | ||
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd | ||
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd | ||
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | ||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd | ||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.0.xsd"> | ||
<context:component-scan base-package="com.fdahpstudydesigner" /> | ||
<context:component-scan base-package="com.fdahpstudydesigner"/> | ||
|
||
<mvc:interceptors> | ||
<mvc:interceptor> | ||
<mvc:mapping path="/**" /> | ||
<bean | ||
class="com.fdahpstudydesigner.util.FdahpStudyDesignerPreHandlerInterceptor"></bean> | ||
</mvc:interceptor> | ||
</mvc:interceptors> | ||
<mvc:interceptors> | ||
<mvc:interceptor> | ||
<mvc:mapping path="/**"/> | ||
<bean | ||
class="com.fdahpstudydesigner.util.FdahpStudyDesignerPreHandlerInterceptor"></bean> | ||
</mvc:interceptor> | ||
</mvc:interceptors> | ||
|
||
<!-- Configure the multipart resolver --> | ||
<bean id="multipartResolver" | ||
class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> | ||
<!-- one of the properties available; the maximum file size in bytes --> | ||
<property name="maxUploadSize" value="10000000" /> | ||
<property name="defaultEncoding" value="utf-8" /> | ||
</bean> | ||
<bean id="viewResolver" | ||
class="org.springframework.web.servlet.view.UrlBasedViewResolver"> | ||
<property name="viewClass"> | ||
<value> | ||
org.springframework.web.servlet.view.tiles2.TilesView | ||
</value> | ||
</property> | ||
</bean> | ||
<!-- Configure the multipart resolver --> | ||
<bean id="multipartResolver" | ||
class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> | ||
<!-- one of the properties available; the maximum file size in bytes --> | ||
<property name="maxUploadSize" value="10000000"/> | ||
<property name="defaultEncoding" value="utf-8"/> | ||
</bean> | ||
<bean id="viewResolver" | ||
class="org.springframework.web.servlet.view.UrlBasedViewResolver"> | ||
<property name="viewClass"> | ||
<value> | ||
org.springframework.web.servlet.view.tiles2.TilesView | ||
</value> | ||
</property> | ||
</bean> | ||
|
||
<bean id="tilesConfigurer" | ||
class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"> | ||
<property name="definitions"> | ||
<list> | ||
<value>/WEB-INF/tiles-defs.xml</value> | ||
</list> | ||
</property> | ||
</bean> | ||
<bean id="tilesConfigurer" | ||
class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"> | ||
<property name="definitions"> | ||
<list> | ||
<value>/WEB-INF/tiles-defs.xml</value> | ||
</list> | ||
</property> | ||
</bean> | ||
|
||
<bean id="messageSource" | ||
class="org.springframework.context.support.ResourceBundleMessageSource"> | ||
<property name="basename" value="resources/messageResource" /> | ||
</bean> | ||
<bean id="messageSource" | ||
class="org.springframework.context.support.ResourceBundleMessageSource"> | ||
<property name="basename" value="resources/messageResource"/> | ||
</bean> | ||
|
||
</beans> |
Oops, something went wrong.