So, here's the thing…
I have implemented custom lucene search based constraint in Java where I used admin:admin to for authentication with AuthenticationService. Now I'm wondering how could I get current logged-in user and check if the user has permissions to read the nodes returned from lucene search.
I tried some things but I think it didn't work cause constraint class is loaded before anyone is logged in so there's no current user. Is it ok to just skip everything until I can get current user?
Can I get current user from my custom constraint or should I implement this using maybe jsf managed bean (just my blind guess) or any other way?