web:framework:spring:security

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentes Révision précédente
Prochaine révisionLes deux révisions suivantes
web:framework:spring:security [2023/12/05 11:11] – [Hiérarchie des authorities] jcheronweb:framework:spring:security [2023/12/05 11:35] – [Configuration des rôles] jcheron
Ligne 363: Ligne 363:
                                     )                                     )
                                     .permitAll();                                     .permitAll();
-                            req.requestMatchers(AntPathRequestMatcher.antMatcher("/admin/**")).hasRole("ROLE_ADMIN"); // (2)+                            req.requestMatchers(AntPathRequestMatcher.antMatcher("/admin/**")).hasRole("ADMIN"); // (2)
                             req.requestMatchers(AntPathRequestMatcher.antMatcher("/user/**")).hasAuthority("USER"); // (3)                             req.requestMatchers(AntPathRequestMatcher.antMatcher("/user/**")).hasAuthority("USER"); // (3)
                             req.requestMatchers(AntPathRequestMatcher.antMatcher("/staff/**")).hasAnyAuthority("USER", "ADMIN", "MANAGER"); // (4)                             req.requestMatchers(AntPathRequestMatcher.antMatcher("/staff/**")).hasAnyAuthority("USER", "ADMIN", "MANAGER"); // (4)
  • web/framework/spring/security.txt
  • Dernière modification : il y a 7 mois
  • de jcheron