Merge branch 'main' of https://gitlab2.istic.univ-rennes1.fr/tuvu/hackathon
This commit is contained in:
@@ -30,11 +30,9 @@ public class WebSecurityConfig {
|
||||
.requestMatchers(HttpMethod.OPTIONS, "/**").permitAll()
|
||||
// 2. Allow public endpoints BEFORE any authenticated() calls
|
||||
.requestMatchers("/athlete/create", "/", "/public").permitAll()
|
||||
.requestMatchers("/coach/**").permitAll()
|
||||
// 3. Authenticated endpoints
|
||||
.requestMatchers("/users/sync").authenticated()
|
||||
.requestMatchers("/coach/**").hasRole("coach")
|
||||
.requestMatchers("/admin/**").hasRole("admin")
|
||||
.requestMatchers("/user/**").hasRole("user")
|
||||
.requestMatchers("/athlete/**").hasRole("athlete")
|
||||
.anyRequest().authenticated())
|
||||
.oauth2ResourceServer(oauth2 -> oauth2
|
||||
.jwt(jwt -> jwt.jwtAuthenticationConverter(jwtToken -> {
|
||||
|
||||
@@ -140,7 +140,6 @@ public class AthleteResource {
|
||||
athlete.setName(dto.getName());
|
||||
athlete.setCategorie(dto.getCategorie());
|
||||
athlete.setNiveau(dto.getNiveau());
|
||||
|
||||
// Relationship: sessionId → session
|
||||
if (dto.getSessionIds() != null) {
|
||||
List<Session> sessions = new ArrayList<>();
|
||||
|
||||
Reference in New Issue
Block a user