JWT Authentication can't resolve ?#{principal.username}
when used in queries
#24374
Milestone
?#{principal.username}
when used in queries
#24374
Overview of the issue
I started updating my jhipster8-demo project today to QA everything before the 8.1.0 release. To add more security around blogs and entries, I modified
BlogResource.java
and thegetAllBlogs()
method.Before:
After:
The
findByUserIsCurrentUser()
method is generated by JHipster in theBlogRepository
class.When I try to fetch the blogs from the UI, the error is:
Motivation for or Use Case
This worked with JHipster 7.
Reproduce the error
Here's my
.yo-rc.json
:And the JDL:
Suggest a Fix
Spring Security's docs seem to indicate a
SecurityEvaluationContextExtension
bean is needed. I tried adding one toSecurityConfiguration.java
, but it does not help:JHipster Version(s)
8.0.0
The text was updated successfully, but these errors were encountered: