Using Ruport and Restful Authentication

I’m using the Ruport Plugin and Restful Authentication Gem. I want to
enable a report that varies depending on the user’s id. They are from
different organisations.
Restful Authentication creates a ‘current_user’ variable that can be
accessed from all other controllers. It allows me to create the views
appropriate to the user.
Unfortunately I can’t access current_user from the Ruport Controllers.
I don’t particularly want to pass an id as a parameter, as a simple
hack will then make reports intended for other partners available to
the wrong people.

Does anybody know how I might address this issue?

What about using roles?
You can get a sample here:
http://railsforum.com/viewtopic.php?id=14216

On Jul 15, 9:13 am, MJohnH [email protected] wrote:

Does anybody know how I might address this issue?

When running your reports, pass the current_user as an option:

MyReportController.render_some_format(:user => current_user)

You can now access this as options.user in your Ruport::Controller /
Formatters.
As a note, for some weird reason if you are using ERb templates, you
need to use @options, I’ll look into that soon.

-greg