stffn / declarative_authorization

An unmaintained authorization plugin for Rails. Please fork to support current versions of Rails
MIT License
1.24k stars 230 forks source link

Strange Issue when using jruby/trinidad in production #163

Open tobsch opened 12 years ago

tobsch commented 12 years ago

Hi there,

I'm just experiencing a strange behaviour in jruby with trinidad in production:

After logging in a user, he seems to have no rights at all. Staying logged in and restarting the server makes it work though.

I patched Authorization::Engine.instance to return a new instance on every request - works. Would be happier if I could still cache the engine instance.

Any ideas?

Best,

Tobias

stffn commented 11 years ago

Caching the Engine instance should reduce the loading of the rules file. Could you check whether the rules get lost at some point?