Browse Source

新增周界系统配置白名单

pull/118/head
xiaoying 1 year ago
parent
commit
ad518c9285
2 changed files with 4 additions and 0 deletions
  1. +2
    -0
      src/main/java/com/tuoheng/gateway/config/WebSecurityConfig.java
  2. +2
    -0
      src/main/java/com/tuoheng/gateway/constants/PermitPathConstant.java

+ 2
- 0
src/main/java/com/tuoheng/gateway/config/WebSecurityConfig.java View File

String[] weptspPermitPath = PermitPathConstant.weptspPermitUrlStr; String[] weptspPermitPath = PermitPathConstant.weptspPermitUrlStr;
String[] airmonitorPermitPath = PermitPathConstant.airmonitorPermitUrlStr; String[] airmonitorPermitPath = PermitPathConstant.airmonitorPermitUrlStr;
String[] telecomumalePermitPath = PermitPathConstant.telecomumaleUrlStr; String[] telecomumalePermitPath = PermitPathConstant.telecomumaleUrlStr;
String[] alertPermitPath = PermitPathConstant.alertleUrlStr;
httpSecurity httpSecurity
.authorizeExchange() .authorizeExchange()
//.pathMatchers(OAUTH_PATH).hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_DSP_MP, AuthorityConstant.SCOPE_TUOHNEG_DSP_WEB) //.pathMatchers(OAUTH_PATH).hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_DSP_MP, AuthorityConstant.SCOPE_TUOHNEG_DSP_WEB)
.pathMatchers(weptspPermitPath).permitAll() .pathMatchers(weptspPermitPath).permitAll()
.pathMatchers(airmonitorPermitPath).permitAll() .pathMatchers(airmonitorPermitPath).permitAll()
.pathMatchers(telecomumalePermitPath).permitAll() .pathMatchers(telecomumalePermitPath).permitAll()
.pathMatchers(alertPermitPath).permitAll()
.pathMatchers("/pilot/miniprogram/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_PILOT_MP) .pathMatchers("/pilot/miniprogram/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_PILOT_MP)
.pathMatchers("/pilot/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_PILOT_ADMIN) .pathMatchers("/pilot/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_PILOT_ADMIN)
.pathMatchers("/hhz/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_HHZ_ADMIN) .pathMatchers("/hhz/admin/**").hasAnyAuthority(AuthorityConstant.SCOPE_ADMIN, AuthorityConstant.SCOPE_TUOHNEG_HHZ_ADMIN)

+ 2
- 0
src/main/java/com/tuoheng/gateway/constants/PermitPathConstant.java View File

"/telecomumale/miniprogram/weiXin/**" "/telecomumale/miniprogram/weiXin/**"
}; };
public static String alertleUrlStr[] = { public static String alertleUrlStr[] = {
"/alert/admin/third/event/**",
"/alert/admin/third/panorama/**"
}; };
} }

Loading…
Cancel
Save