Skip to content

Commit af8ecda

Browse files
committed
Task 82 : Revise roles in SecurityConfig of Management Service
1 parent 610efbb commit af8ecda

File tree

3 files changed

+19
-7
lines changed

3 files changed

+19
-7
lines changed

.idea/compiler.xml

Lines changed: 13 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/encodings.xml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

management-service/src/main/java/com/springbootmicroservices/management/security/SecurityConfig.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ protected void configure(HttpSecurity http) throws Exception {
2525
super.configure(http);
2626
http.csrf().disable();
2727
http.authorizeRequests()
28-
.antMatchers("/api/v1/admin_role/*").hasAnyRole("ROLE_ADMIN")
29-
.antMatchers("/api/v1/user_role/*").hasAnyRole("ROLE_USER")
30-
.antMatchers("/actuator/health").hasAnyRole("ROLE_ADMIN")
31-
.antMatchers("/actuator/circuitbreakerevents").hasAnyRole("ROLE_ADMIN")
28+
.antMatchers("/api/v1/admin_role/*").hasAnyRole("ADMIN")
29+
.antMatchers("/api/v1/user_role/*").hasAnyRole("USER")
30+
.antMatchers("/actuator/health").hasAnyRole("ADMIN")
31+
.antMatchers("/actuator/circuitbreakerevents").hasAnyRole("ADMIN")
3232
.anyRequest()
3333
.permitAll();
3434

0 commit comments

Comments
 (0)