Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sec: authorize, hidden display problem #51

Open
ss96766 opened this issue Nov 17, 2017 · 8 comments
Open

sec: authorize, hidden display problem #51

ss96766 opened this issue Nov 17, 2017 · 8 comments
Assignees

Comments

@ss96766
Copy link

ss96766 commented Nov 17, 2017

I've introduced thymeleaf-extras-springsecurity4 in pom. html page namespace is also added http://www.thymeleaf.org/extras/spring-security. But why I did not log in, sec: authorize = "isAuthenticated ()" This can not be hidden

@danielfernandez
Copy link
Member

I'm not sure I understand your problem. Could you please be more specific?

If what you say is that a sec:authorize attribute still appears in your executed template, my question would be: are you using Spring Boot? if not, there is no reason the SpringSecurity Dialect would have registered itself, so besides adding the dialect to the pom.xml you'd need to add your dialect to the TemplateEngine as explained in the documentation.

@StupidPz
Copy link

I have the same problem.And i'm using SpringBoot.I tried thymeleaf-extras-springsecurity4 and thymeleaf-extras-springsecurity3,but failed.I still could see the sec element using F12 .it seemd that was not resovled by thymeleaf

@Kingsearch
Copy link

@StupidPz me too

@marccollin
Copy link

specify your spring boot version, please...

@StupidPz
Copy link

@Kingsearch @marccollin try to change the version.it should work.

<thymeleaf.version>3.0.8.RELEASE</thymeleaf.version>
<thymeleaf-layout-dialect.version>2.2.2</thymeleaf-layout-dialect.version>
<thymeleaf-extras-springsecurity4.version>3.0.2.RELEASE</thymeleaf-extras-springsecurity4.version>

@dokle
Copy link

dokle commented Apr 11, 2018

Worked for me with the versions specified by @StupidPz , thank you :). I've just changed the version of thymeleaf-layout-dialect.version to 2.3.0

I'm using Spring Boot Version 2.0.1.RELEASE

@jalmoreno
Copy link

jalmoreno commented Jan 2, 2019

@StupidPz @dokle thanks!!

It took me a lot of time!

My properties:

<thymeleaf.version>3.0.9.RELEASE</thymeleaf.version>
<thymeleaf-layout-dialect.version>2.2.2</thymeleaf-layout-dialect.version>
<thymeleaf-extras-springsecurity4.version>3.0.4.RELEASE</thymeleaf-extras-springsecurity4.version>

@towfiq-bK
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants