Skip to content

Commit 93cfb17

Browse files
committed
Fix: get users username
1 parent 4bc1153 commit 93cfb17

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/cat/udl/eps/softarch/demo/config/WebSecurityConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ protected SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exce
3232
// Users
3333
.requestMatchers(HttpMethod.GET, "/users").authenticated()
3434
.requestMatchers(HttpMethod.POST, "/users").anonymous()
35-
.requestMatchers(HttpMethod.GET, "/users/{username}").anonymous()
35+
.requestMatchers(HttpMethod.GET, "/users/{username}").authenticated()
3636
.requestMatchers(HttpMethod.POST, "/users/*").denyAll()
3737
// Admins
3838
.requestMatchers(HttpMethod.GET, "/admins").hasRole("ADMIN")

0 commit comments

Comments
 (0)