Closed mahedi99 closed 4 years ago
With the following snippet it works fine: .antMatchers("/admin")..permitAll()
.antMatchers("/admin")..permitAll()
However, it doesn't work whenever I check by role: .antMatchers("/admin").hasRole("ADMIN")
.antMatchers("/admin").hasRole("ADMIN")
hasAuthority() instead of hasRole() solves the problem.
hasAuthority()
hasRole()
Since with `hsRole()' : 'ROLE_' prefix is automatically added
With the following snippet it works fine:
.antMatchers("/admin")..permitAll()
However, it doesn't work whenever I check by role:
.antMatchers("/admin").hasRole("ADMIN")