| | |
| | | "/api/admin/user/conversion", |
| | | "/api/admin/examPaperGrade/updates", |
| | | "/api/admin/question/download/question/import/temp", |
| | | "/api/admin/question/question/import", |
| | | "/api/upload/**" |
| | | "/api/admin/question/question/import" |
| | | ).permitAll() |
| | | .antMatchers("/files/**").permitAll() |
| | | // 静态资源,可匿名访问 |
| | | // todo 设置部门管理员可以看的请求 |
| | | .antMatchers("/api/admin/**").hasAnyRole(RoleEnum.ADMIN.getName(), RoleEnum.DEPT_ADMIN.getName()) |
| | | .antMatchers("/api/student/**").hasRole(RoleEnum.STUDENT.getName()) |
| | | .antMatchers("/api/student/**").hasAnyRole(RoleEnum.STUDENT.getName(), RoleEnum.DEPT_ADMIN.getName()) |
| | | .anyRequest().permitAll() |
| | | .and().exceptionHandling().accessDeniedHandler(restAccessDeniedHandler) |
| | | .and().formLogin().successHandler(restAuthenticationSuccessHandler).failureHandler(restAuthenticationFailureHandler) |