Role Based Access to a Row

Suppose I have a table with following report.

Department A 3,000 2,000
Department B 2,000 13,000
Department B 3,000 2,000

Now if I login from User A, Department A data should be displayed. Similarly I login from User B, Department B data should be displayed.

What are possible options to do it?

 

m.imran.tariq's picture
Joined: Mar 24 2017 - 5:40am
Last seen: 6 years 2 weeks ago

Hi,

what you can try is to use LoggedInUsername buit-in parameter to retrieve logged in user and use it in a query
to retrieve requried records:

http://community.jaspersoft.com/wiki/built-parameters-logged-user

Best regards,
Andrew

asimkin - 6 years 2 weeks ago

Shouldn't I use roles instead of using username?

m.imran.tariq - 6 years 2 weeks ago

Hi,

it depenends on your requirements. You mentioned users in question:

if I login from User A, Department A data should be displayed

You can use any of the built-in parameters per your scenario.

Best regards

asimkin - 6 years 2 weeks ago

1 Answer:

If you have the commercial version of jrs, and your report uses a Domain, then there's a whole description of how to do it in the secuity guide:

http://community.jaspersoft.com/documentation/tibco-jasperreports-server...

elizam's picture
14292
Joined: Mar 5 2012 - 9:19am
Last seen: 2 years 10 months ago
Feedback
randomness