5 Replies Latest reply on Oct 4, 2010 3:27 PM by Lelo Pieri

    EJBQL and Logged User

    Lelo Pieri Newbie

      Hi,


      I'd like to write a EJBQL where I can filter considering the logged user and its roles.
      For example the logged user is associated to a company, and, if hasRole('admin') he can se all companies, otherwise, he can se just the company he is associated. I have the logged user in session and he has his associated company.


      At the end, I'll want to lead more complex then it, but for now it would enough.


      Any idea?


      Thanks for all