malek Posted July 21, 2009 Share Posted July 21, 2009 Hiis there a way to know the Roles assigned to the current logged in users ??I need to use it to restrict query result ........... Link to comment Share on other sites More sharing options...
javi_123 Posted July 21, 2009 Share Posted July 21, 2009 No sure how you want to restrict it but here is the expression to get hold of the roles for logged in user: $P{LoggedInUser}.getRoles().toString() where $P{LoggedInUser} class type is com.jaspersoft.jasperserver.api.metadata.user.domain.User Regards Javed Link to comment Share on other sites More sharing options...
Gaby38 Posted July 21, 2009 Share Posted July 21, 2009 Another way that I use is to access directly by sql the metadatabase : JIuser and JIuserrole tables. I also use the users rights to make my own access controls to be able to execute such or such report. Link to comment Share on other sites More sharing options...
malek Posted July 22, 2009 Author Share Posted July 22, 2009 thank you javi_123, this is exactly what i need. i think to set parameter in scriptlet before report initialized.. when role is (role1) then parameter = (value1) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now