thymeleaf / thymeleaf-extras-springsecurity

Thymeleaf "extras" integration module for Spring Security 3.x and 4.x
http://www.thymeleaf.org
Apache License 2.0
482 stars 106 forks source link

sec:authorize doesn't display expected behaviour #68

Open ghost opened 4 years ago

ghost commented 4 years ago

Summary

I'm using Spring Cloud Gateway (which uses Webflux), but there is a bug which is preventing me displaying content to ONLY those who are not logged in (using thymeleaf).

Actual Behavior

Expected Behavior

Configuration

I have my spring security dialect bean defined, as I know this causes issues for some

@Bean
public SpringSecurityDialect springSecurityDialect() {
    return new SpringSecurityDialect();
}

It's importing org.thymeleaf.extras.springsecurity5.dialect.SpringSecurityDialect;

Version

towfiq-bK commented 2 weeks ago

@ultraq
try adding the code below which worked for me: xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"