修改权限

This commit is contained in:
2021-03-23 11:48:58 +08:00
parent 40f7e34528
commit f1dacb165a

View File

@@ -69,7 +69,7 @@ public class SecurityConfigurer {
.antMatchers(securityIgnoreUrls.toArray(ignores)).permitAll()
.antMatchers("/api/admin/**").hasRole(RoleEnum.ADMIN.getName())
.antMatchers("/api/student/exampaper/answer/read/*").hasAnyRole(RoleEnum.ADMIN.getName(),RoleEnum.STUDENT.getName())
.antMatchers("/api/student/exampaper/answer/edit").hasAnyRole(RoleEnum.ADMIN.getName(),RoleEnum.STUDENT.getName())
.antMatchers("/api/student/exampaper/answer/edit").hasAnyRole(RoleEnum.ADMIN.getName())
.antMatchers("/api/student/**").hasRole(RoleEnum.STUDENT.getName())
.anyRequest().permitAll()
.and().exceptionHandling().accessDeniedHandler(restAccessDeniedHandler)