Advertisement
Konnor95

Untitled

May 29th, 2015
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 5.94 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3.       xmlns:security="http://www.springframework.org/schema/security"
  4.       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  5.       xsi:schemaLocation="http://www.springframework.org/schema/beans
  6.            http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
  7.            http://www.springframework.org/schema/security
  8.            http://www.springframework.org/schema/security/spring-security-3.1.xsd">
  9.  
  10.  
  11.     <!-- Secured pages -->
  12.     <security:http auto-config="true" use-expressions="true" authentication-manager-ref="authenticationManager">
  13.  
  14.         <security:intercept-url pattern="/api/**" access="permitAll()"/>
  15.         <security:intercept-url pattern="/login" access="permitAll()"/>
  16.  
  17.         <!-- Menu pages -->
  18.         <security:intercept-url pattern="/users.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  19.         <security:intercept-url pattern="/groups.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  20.         <security:intercept-url pattern="/tasks.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  21.         <security:intercept-url pattern="/topics.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  22.  
  23.         <!-- Users -->
  24.         <security:intercept-url pattern="/addUsers.do" access="hasRole('ADMIN')"/>
  25.         <security:intercept-url pattern="/registration.do" access="hasRole('ADMIN')"/>
  26.         <security:intercept-url pattern="/updateUser.do" access="hasRole('ADMIN')"/>
  27.  
  28.         <!-- Groups -->
  29.         <security:intercept-url pattern="/createGroup.do" access="hasRole('ADMIN')"/>
  30.         <security:intercept-url pattern="/editGroup.do" access="hasAnyRole('ADMIN')"/>
  31.         <security:intercept-url pattern="/deactivateGroups.do" access="hasRole('ADMIN')"/>
  32.  
  33.         <!-- Tasks -->
  34.         <security:intercept-url pattern="/createTask.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  35.         <security:intercept-url pattern="/personalJournal.do" access="hasAnyRole('ADMIN','MENTOR','MENTEE')"/>
  36.         <security:intercept-url pattern="/assignTask.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  37.         <security:intercept-url pattern="/updateTask.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  38.         <security:intercept-url pattern="/removeTasks.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  39.         <security:intercept-url pattern="/checkTask.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  40.         <security:intercept-url pattern="/groupTasksTests.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  41.  
  42.         <!-- Questions -->
  43.         <security:intercept-url pattern="/getQuestionsByTopic.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  44.         <security:intercept-url pattern="/getQuestionsById.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  45.         <security:intercept-url pattern="/topicQuestions.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  46.         <security:intercept-url pattern="/questionById.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  47.         <security:intercept-url pattern="/saveQuestion.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  48.         <security:intercept-url pattern="/deleteQuestion.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  49.         <security:intercept-url pattern="/notAssingned.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  50.  
  51.         <!-- Activities -->
  52.         <security:intercept-url pattern="/deleteActivities.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  53.         <security:intercept-url pattern="/getActivityById.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  54.         <security:intercept-url pattern="/personalActivity.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  55.  
  56.         <!-- Topics -->
  57.         <security:intercept-url pattern="/getDescription.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  58.         <security:intercept-url pattern="/updateTopic.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  59.         <security:intercept-url pattern="/topics.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  60.  
  61.         <!-- Journals -->
  62.         <security:intercept-url pattern="/menteeJournal.do" access="hasAnyRole('ADMIN','MENTOR','MENTEE')"/>
  63.  
  64.         <!-- Tests -->
  65.         <security:intercept-url pattern="/createEditTest.do" access="hasAnyRole('ADMIN','MENTOR')"/>
  66.         <security:intercept-url pattern="/testPage.do" access="hasAnyRole('ADMIN','LAB_MANAGER','MENTOR')"/>
  67.         <security:intercept-url pattern="/passTest.do" access="hasRole('MENTEE')"/>
  68.         <security:intercept-url pattern="/alltests.do" access="hasAnyRole('ADMIN','LAB_MANAGER')"/>
  69.         <security:intercept-url pattern="/stopTest.do" access="hasRole('MENTEE')"/>
  70.         <security:intercept-url pattern="/userTestInfo.do" access="hasAnyRole('ADMIN','LAB_MANAGER','MENTOR','MENTEE')"/>
  71.         <security:intercept-url pattern="/menteeResults.do" access="hasAnyRole('ADMIN','MENTOR','LAB_MANAGER')"/>
  72.  
  73.         <!-- Candidates -->
  74.         <security:intercept-url pattern="/candidateResults.do" access="hasAnyRole('ADMIN','MENTOR','LAB_MANAGER')"/>
  75.         <security:intercept-url pattern="/candidateTestInfo.do" access="hasAnyRole('ADMIN','MENTOR','LAB_MANAGER')"/>
  76.  
  77.         <security:intercept-url pattern="/**" access="isAuthenticated()"/>
  78.  
  79.         <security:custom-filter before="PRE_AUTH_FILTER" ref="preAuthFilter"/>
  80.  
  81.         <security:form-login login-page="/login" />
  82.  
  83.         <security:logout
  84.                logout-url="/logout"
  85.                invalidate-session="true"
  86.                delete-cookies="JSESSIONID"
  87.                success-handler-ref="restLogoutSuccessHandler"
  88.                />
  89.  
  90.     </security:http>
  91.  
  92.     <bean id="preAuthFilter" class="com.epam.khppp.web.filter.TestAuthorizationTokenFilter"/>
  93.  
  94.     <security:authentication-manager alias="authenticationManager">
  95.         <security:authentication-provider ref="authenticationProvider"/>
  96.     </security:authentication-manager>
  97.  
  98.     <bean id="authenticationProvider" class="com.epam.khppp.security.CustomAuthenticationProvider"/>
  99.  
  100.     <bean id="restLogoutSuccessHandler" class="com.epam.khppp.security.RestLogoutSuccessHandler"/>
  101.  
  102. </beans>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement