Topic: ModelSecurity

Hi there

I'm using the ModelSecurity plugin, which works pretty fine with my user class.

But how do I use this in my other models? How can I access methods like ".admin?". Do I need to create a user object in every model?

I'd appraeciate any hint! smile


Re: ModelSecurity

I think I found the solution: The static method


returns the current user

Re: ModelSecurity

I've got an email by a rails developper who asked if it's possible to access all methods via User.current, the answer is yes you can.

If you have a colum, e.g. age, you can access this via User.current.age.