|
|
@@ -110,7 +110,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|
|
.authorizeRequests()
|
|
|
//跨域的Options请求进行放行
|
|
|
.requestMatchers(CorsUtils::isPreFlightRequest).permitAll()
|
|
|
- .antMatchers("/**").hasAnyRole(WebSecurityConstants.STUDENT_ROLE, WebSecurityConstants.ADMIN_ROLE)
|
|
|
+ .antMatchers("/**").hasAnyRole(WebSecurityConstants.STUDENT_ROLE, WebSecurityConstants.ADMIN_ROLE, WebSecurityConstants.TEACHER_ROLE)
|
|
|
//其他所有接口都要在登陆认证状态下请求
|
|
|
.anyRequest().authenticated();
|
|
|
|