@@ -32,7 +32,6 @@ class SecurityConfig(
3232 .and ()
3333 .sessionManagement()
3434 .sessionCreationPolicy(SessionCreationPolicy .STATELESS )
35-
3635 http.authorizeRequests()
3736 .requestMatchers(CorsUtils ::isCorsRequest)
3837 .permitAll()
@@ -57,18 +56,18 @@ class SecurityConfig(
5756 " /admin/key"
5857 ).permitAll()
5958 .antMatchers(
60- HttpMethod .POST ,
61- " /user/club " ,
62- " /after/** " ,
63- " /meal " ,
64- " /notice " ,
65- " /schedule/create " ,
66- " /self-study/register " ,
67- " /timetable" ,
68- " /weekend-meal/saveAll " ,
69- " /status/saveAll " ,
70- " /schedule /**"
71- ).hasRole(Role .SCH .name)
59+ HttpMethod .GET ,
60+ " /user/simple " ,
61+ " /user/details " ,
62+ " /application/my " ,
63+ " /application/simple " ,
64+ " /class-room/move " ,
65+ " /early-return/my " ,
66+ " /timetable/today " ,
67+ " /timetable/week " ,
68+ " /weekend-meal/my " ,
69+ " /notification /**"
70+ ).hasRole(Role .STU .name)
7271 .antMatchers(
7372 HttpMethod .GET ,
7473 " /admin/**" ,
@@ -94,8 +93,41 @@ class SecurityConfig(
9493 " /status/**" ,
9594 " /user/all" ,
9695 " /status/grade" ,
97- " /timetable/all"
96+ " /timetable/all" ,
97+ " /weekend-meal/excel" ,
98+ " /weekend-meal/excel/grade" ,
99+ " /application/non-return"
100+ ).hasRole(Role .SCH .name)
101+ .antMatchers(
102+ HttpMethod .GET ,
103+ " /meal/date"
104+ ).authenticated()
105+ .antMatchers(
106+ HttpMethod .POST ,
107+ " /application" ,
108+ " /class-room/move" ,
109+ " /early-return/create"
110+ ).hasRole(Role .STU .name)
111+ .antMatchers(
112+ HttpMethod .POST ,
113+ " /user/club" ,
114+ " /after/**" ,
115+ " /meal" ,
116+ " /notice" ,
117+ " /schedule/create" ,
118+ " /self-study/register" ,
119+ " /timetable" ,
120+ " /weekend-meal/saveAll" ,
121+ " /status/saveAll" ,
122+ " /schedule/**"
98123 ).hasRole(Role .SCH .name)
124+ .antMatchers(
125+ HttpMethod .PATCH ,
126+ " /application/status" ,
127+ " /weekend-meal/my-status" ,
128+ " /user/profile" ,
129+ " /notification/**"
130+ ).hasRole(Role .STU .name)
99131 .antMatchers(
100132 HttpMethod .PATCH ,
101133 " /application/**" ,
@@ -110,6 +142,10 @@ class SecurityConfig(
110142 " /weekend-meal/period" ,
111143 " /timetable/change"
112144 ).hasRole(Role .SCH .name)
145+ .antMatchers(
146+ HttpMethod .DELETE ,
147+ " /class-room/return"
148+ ).hasRole(Role .STU .name)
113149 .antMatchers(
114150 HttpMethod .DELETE ,
115151 " /after/**" ,
@@ -118,46 +154,6 @@ class SecurityConfig(
118154 " /after/delete"
119155 )
120156 .hasRole(Role .SCH .name)
121- .antMatchers(
122- HttpMethod .POST ,
123- " /application" ,
124- " /class-room/move" ,
125- " /early-return/create"
126- ).hasRole(Role .STU .name)
127- .antMatchers(
128- HttpMethod .PATCH ,
129- " /application/status" ,
130- " /weekend-meal/my-status" ,
131- " /user/profile" ,
132- " /notification/**"
133- ).hasRole(Role .STU .name)
134- .antMatchers(
135- HttpMethod .GET ,
136- " /user/simple" ,
137- " /user/details" ,
138- " /application/my" ,
139- " /application/simple" ,
140- " /class-room/move" ,
141- " /early-return/my" ,
142- " /meal/date" ,
143- " /timetable/today" ,
144- " /timetable/week" ,
145- " /weekend-meal/my" ,
146- " /notification/**"
147- ).hasRole(Role .STU .name)
148- .antMatchers(
149- HttpMethod .DELETE ,
150- " /class-room/return"
151- ).hasRole(Role .STU .name)
152- .antMatchers(
153- HttpMethod .GET ,
154- " /application/non-return"
155- ).hasRole(Role .SCH .name)
156- .antMatchers(
157- HttpMethod .GET ,
158- " /weekend-meal/excel" ,
159- " /weekend-meal/excel/grade"
160- ).hasRole(Role .SCH .name)
161157 .anyRequest().authenticated()
162158 .and ()
163159 .exceptionHandling()
0 commit comments