Search code examples
jasperserver

Restricting user to view only specific reports?


I'm working on JasperReports Server community edition.

I need to configure it so, that after logging in a user can only see specific reports, otherwise s/he should not see any other folder/resource.

As per Jaspers permission Guide, it should work with this solution but does not work somehow.

  • A new role eg "TEST_ROLE" was created by jasperadmin.
  • A new user "TEST_USER" was created and the role "TEST_ROLE" was assigned to him/her.
  • Now for the "TEST_ROLE:
    • For Repository root, permission No Access was set.
    • only on specific reports Read onlypermission was granted.

But when TEST_USER logs in, he sees below message:

You do not have permission to view this page.

Please contact your system administrator or log in as a user with permission.

Why it does not work?

Question2:- User with role "TEST_ROLE" should not be able to upgrade his permission. Is it achievable with permission Read only as I have described above?

Question3:- I did not get what's the diffence between Execute only and Read only permissions?. What I could comprehend that user can view/execute self created reports with execute only permissions?


Solution

  • The difference between Execute Only and Read Only is that those resources which have Execute Only cannot be 'seen' by the user but can be executed.

    This becomes relevant when reports that the user can see are dependent on other resources in the repository eg datasources, domains, images etc.. .

    To run the report the user must also have access to these other resources.

    If you want to restrict the user to only to be able to view reports they can run then set the reports to 'Read Only' and set all dependent resources to 'Execute Only' on the relevant role.

    This is what is possibly causing the permissions error you are seeing.