|
Re: Controlling user access to web reports [message #988455 is a reply to message #987868] |
Thu, 29 November 2012 23:48 |
|
If you could grab the username and had access to a list to cross check if they should be able to view the report, you could drop all elements, in your beforeFactory script except for a label stating that the user doesn't have access to the report.
Michael
Developer Evangelist, Silanis
|
|
|
|
Re: Controlling user access to web reports [message #989816 is a reply to message #989765] |
Sat, 08 December 2012 00:43 |
|
Not show/hide. Actually drop the elements. You should be able to create a dataSet in your report that checks your user. Then, you could use the data engine api to check the results of the dataSet, in your beforeFactory. If the user doesn't check out, you can drop all of the tables in the report so that none of the datasets even run and show an error label. You could also just connect to your db in script and check for the username without the data engine api.
Michael
Developer Evangelist, Silanis
|
|
|
|
|
|
Re: Controlling user access to web reports [message #990254 is a reply to message #987868] |
Tue, 11 December 2012 15:44 |
Sapphie Missing name Messages: 21 Registered: October 2010 |
Junior Member |
|
|
This seems to work but I wondered if there was a more generic way?
var request = reportContext.getHttpServletRequest();
if (request!=null) {
if (request.getServerName() == '127.0.0.1')
{
// This is running locally so can we assume from the report designer?
// Do valid stuff when run locally
}
else
{
// do stuff when run remotely
}
}
Though, of course, the above could also apply when running the report via the web viewer when logged in to the server.
Lee
[Updated on: Tue, 11 December 2012 15:53] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04540 seconds