From 4d3dc99a8ec98e18609f2dca23a6a28fd25069fc Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期三, 23 十月 2024 16:55:27 +0800 Subject: [PATCH] 用户查询优化 --- src/main/java/com/ycl/jxkg/config/spring/security/SecurityConfigurer.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/ycl/jxkg/config/spring/security/SecurityConfigurer.java b/src/main/java/com/ycl/jxkg/config/spring/security/SecurityConfigurer.java index 3bf787b..fb2a490 100644 --- a/src/main/java/com/ycl/jxkg/config/spring/security/SecurityConfigurer.java +++ b/src/main/java/com/ycl/jxkg/config/spring/security/SecurityConfigurer.java @@ -91,7 +91,7 @@ .authorizeRequests() .antMatchers(securityIgnoreUrls.toArray(ignores)).permitAll() .antMatchers("/api/admin/user/update/password").permitAll() - .antMatchers("/api/admin/**").hasRole(RoleEnum.ADMIN.getName()) + .antMatchers("/api/admin/**").hasAnyRole(RoleEnum.ADMIN.getName(),RoleEnum.TEACHER.getName()) .antMatchers("/api/student/**").hasRole(RoleEnum.STUDENT.getName()) .antMatchers("/api/register/**").anonymous() .anyRequest().permitAll() -- Gitblit v1.8.0